diff options
author | Arnout Engelen <arnout@bzzt.net> | 2021-05-06 10:08:08 +0200 |
---|---|---|
committer | Arnout Engelen <arnout@bzzt.net> | 2021-05-07 09:53:35 +0200 |
commit | b68130fd2cb836f80ee6c8eb8840c39a12c50bef (patch) | |
tree | b600e65b2bc257a42dd5935f21c935e1a11feed3 /pkgs/applications/science | |
parent | 39e6bf76474ce742eb027a88c4da6331f0a1526f (diff) |
test-utilities: version test
Extract 'version test' to a reusable test utility as discussed in https://github.com/NixOS/nixpkgs/pull/119636#issuecomment-826137021 and
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/logic/key/default.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/applications/science/logic/key/default.nix b/pkgs/applications/science/logic/key/default.nix index 531081beafaf3..e9b0cc7540b59 100644 --- a/pkgs/applications/science/logic/key/default.nix +++ b/pkgs/applications/science/logic/key/default.nix @@ -5,7 +5,7 @@ , ant , jre , makeWrapper -, runCommand +, testVersion , key }: @@ -51,10 +51,13 @@ in stdenv.mkDerivation rec { --add-flags "-cp $out/share/java/KeY.jar de.uka.ilkd.key.core.Main" ''; - passthru.tests.check-version = runCommand "key-help" {} '' - ${key}/bin/KeY --help | grep 2.5 # Wrong version in the code. On next version change to ${version} - touch $out - ''; + passthru.tests.version = + testVersion { + package = key; + command = "KeY --help"; + # Wrong '2.5' version in the code. On next version change to ${version} + version = "2.5"; + }; meta = with lib; { description = "Java formal verification tool"; |