Skip to content

Commit

Permalink
mydumper: add version tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelglass committed Nov 19, 2024
1 parent c5610aa commit 963a14b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pkgs/by-name/my/mydumper/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, libsysprof-capture, libmysqlclient, libressl
, zlib, zstd
, libselinux, libsepol
, nix-update-script
, nix-update-script, testers, versionCheckHook, mydumper
}:

stdenv.mkDerivation rec {
Expand All @@ -24,6 +24,9 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ cmake pkg-config sphinx python3Packages.furo ];

nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;

buildInputs = [
glib pcre pcre2 util-linux
libmysqlclient libressl libsysprof-capture
Expand Down Expand Up @@ -62,6 +65,13 @@ stdenv.mkDerivation rec {

passthru.updateScript = nix-update-script { };

# mydumper --version is checked in `versionCheckHook`
passthru.tests = testers.testVersion {
package = mydumper;
command = "myloader --version";
version = "myloader v${version}";
};

meta = with lib; {
description = "High-performance MySQL backup tool";
homepage = "https://github.com/mydumper/mydumper";
Expand Down

0 comments on commit 963a14b

Please sign in to comment.