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
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user