about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2021-05-07 11:56:01 +0200
committerGitHub <noreply@github.com>2021-05-07 11:56:01 +0200
commitaaec26af39dbfb597c3c56889f72fc676d7116cc (patch)
tree48dd4434a18819a7510a188d96525bd631c225bf /pkgs/applications/science
parent26cb44f97db998475190a1de6cae00b0b30a08b3 (diff)
parentb68130fd2cb836f80ee6c8eb8840c39a12c50bef (diff)
Merge pull request #121896 from raboof/extract-version-test-to-utility
test-utilities: version test
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/logic/key/default.nix13
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";