tests: make sotest opt-in
Sotest must be explicitly enabled for tests. Use new build-product subtypes for hydra. Use bender binary provided by Cyberus.
This commit is contained in:
parent
78c5a2bb19
commit
722edd4d8e
|
@ -56,12 +56,13 @@ let
|
|||
hw-sotest = map ({ name, value }: {
|
||||
name = name + "-sotest";
|
||||
value = value.sotest;
|
||||
}) (testsToList hw);
|
||||
}) (builtins.filter ({ name, value }: !isNull value.sotest) (testsToList hw));
|
||||
|
||||
nova-sotest = map ({ name, value }: {
|
||||
name = name + "-sotest";
|
||||
value = value.sotest;
|
||||
}) (testsToList nova);
|
||||
}) (builtins.filter ({ name, value }: !isNull value.sotest)
|
||||
(testsToList nova));
|
||||
|
||||
in with builtins;
|
||||
listToAttrs ((concatLists (map (testsToList) [ linux hw nova ])) ++ hw-sotest
|
||||
|
|
|
@ -38,7 +38,7 @@ let
|
|||
''run_genode_until {[init] child "harness" exited with exit value 0} 60'';
|
||||
|
||||
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
|
||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], sotest ? false, ... }@t:
|
||||
let
|
||||
manifest = lib.mergeManifests (map addManifest
|
||||
(with testPkgs; [ base-hw-pc init sotest-producer ] ++ testInputs));
|
||||
|
@ -141,18 +141,21 @@ let
|
|||
xml = buildPackages.runCommand (name + ".config") testEnv'
|
||||
''${apps.render-init.program} <<< "(${testConfig'}).config" > $out'';
|
||||
|
||||
sotest = buildPackages.runCommand "hw-${name}-sotest" testEnv' ''
|
||||
sotest = if sotest then
|
||||
buildPackages.runCommand "hw-${name}-sotest" testEnv' ''
|
||||
cp "${testPkgs.bender}" bender
|
||||
cp ${image} image.elf
|
||||
mkdir -p $out/nix-support
|
||||
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
|
||||
bender image.elf
|
||||
image.elf
|
||||
${apps.dhall-to-yaml.program} < ${
|
||||
./sotest_hw_config.dhall
|
||||
} > "$out/sotest_config.yaml"
|
||||
echo file zip $out/binaries.zip >> "$out/nix-support/hydra-build-products"
|
||||
echo file config $out/sotest_config.yaml >> "$out/nix-support/hydra-build-products"
|
||||
'';
|
||||
echo file sotest-binaries $out/binaries.zip >> "$out/nix-support/hydra-build-products"
|
||||
echo file sotest-config $out/sotest_config.yaml >> "$out/nix-support/hydra-build-products"
|
||||
''
|
||||
else
|
||||
null;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ let
|
|||
''run_genode_until {[init] child "harness" exited with exit value 0} 60'';
|
||||
|
||||
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
|
||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], sotest ? false, ... }@t:
|
||||
let
|
||||
manifest = lib.mergeManifests (map addManifest (with testPkgs;
|
||||
[ base-nova (genodeSources.make "init") sotest-producer ]
|
||||
|
@ -143,19 +143,22 @@ let
|
|||
|
||||
iso = apps.nova-iso.function testEnv' "${testConfig'}";
|
||||
|
||||
sotest = buildPackages.runCommand "nova-${name}-sotest" testEnv' ''
|
||||
sotest = if sotest then
|
||||
buildPackages.runCommand "nova-${name}-sotest" testEnv' ''
|
||||
cp "${testPkgs.bender}" bender
|
||||
cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor
|
||||
cp ${image} image.elf
|
||||
mkdir -p $out/nix-support
|
||||
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
|
||||
bender hypervisor image.elf
|
||||
hypervisor image.elf
|
||||
${apps.dhall-to-yaml.program} < ${
|
||||
./sotest_config.dhall
|
||||
./sotest_nova_config.dhall
|
||||
} > "$out/sotest_config.yaml"
|
||||
echo file zip $out/binaries.zip >> "$out/nix-support/hydra-build-products"
|
||||
echo file config $out/sotest_config.yaml >> "$out/nix-support/hydra-build-products"
|
||||
'';
|
||||
echo file sotest-binaries $out/binaries.zip >> "$out/nix-support/hydra-build-products"
|
||||
echo file sotest-config $out/sotest_config.yaml >> "$out/nix-support/hydra-build-products"
|
||||
''
|
||||
else
|
||||
null;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ let
|
|||
tests = [
|
||||
{
|
||||
name = "multi";
|
||||
sotest = true;
|
||||
testConfig = "${./.}/solo5.dhall";
|
||||
testInputs = map genodeMake [ "app/ping" ] ++ (map genodeDepot [
|
||||
"ram_block"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ boot_items =
|
||||
[ { exec = "bender", load = [ "image.elf" ], name = "Genode base-hw" } ]
|
||||
, boot_panic_patterns = [ "Error: init", "PAGE-FAULT IN CORE" ]
|
||||
, extra_dependencies = [ { name = "bender", url = "https://sotest.io/bender" } ]
|
||||
}
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
, name = "NOVA with Genode"
|
||||
}
|
||||
]
|
||||
, boot_panic_patterns = [ "Error: init", "PAGE-FAULT IN CORE" ]
|
||||
, extra_dependencies = [ { name = "bender", url = "https://sotest.io/bender" } ]
|
||||
}
|
Loading…
Reference in New Issue