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 }: {
|
hw-sotest = map ({ name, value }: {
|
||||||
name = name + "-sotest";
|
name = name + "-sotest";
|
||||||
value = value.sotest;
|
value = value.sotest;
|
||||||
}) (testsToList hw);
|
}) (builtins.filter ({ name, value }: !isNull value.sotest) (testsToList hw));
|
||||||
|
|
||||||
nova-sotest = map ({ name, value }: {
|
nova-sotest = map ({ name, value }: {
|
||||||
name = name + "-sotest";
|
name = name + "-sotest";
|
||||||
value = value.sotest;
|
value = value.sotest;
|
||||||
}) (testsToList nova);
|
}) (builtins.filter ({ name, value }: !isNull value.sotest)
|
||||||
|
(testsToList nova));
|
||||||
|
|
||||||
in with builtins;
|
in with builtins;
|
||||||
listToAttrs ((concatLists (map (testsToList) [ linux hw nova ])) ++ hw-sotest
|
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'';
|
''run_genode_until {[init] child "harness" exited with exit value 0} 60'';
|
||||||
|
|
||||||
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
||||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
|
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], sotest ? false, ... }@t:
|
||||||
let
|
let
|
||||||
manifest = lib.mergeManifests (map addManifest
|
manifest = lib.mergeManifests (map addManifest
|
||||||
(with testPkgs; [ base-hw-pc init sotest-producer ] ++ testInputs));
|
(with testPkgs; [ base-hw-pc init sotest-producer ] ++ testInputs));
|
||||||
|
@ -141,18 +141,21 @@ let
|
||||||
xml = buildPackages.runCommand (name + ".config") testEnv'
|
xml = buildPackages.runCommand (name + ".config") testEnv'
|
||||||
''${apps.render-init.program} <<< "(${testConfig'}).config" > $out'';
|
''${apps.render-init.program} <<< "(${testConfig'}).config" > $out'';
|
||||||
|
|
||||||
sotest = buildPackages.runCommand "hw-${name}-sotest" testEnv' ''
|
sotest = if sotest then
|
||||||
cp "${testPkgs.bender}" bender
|
buildPackages.runCommand "hw-${name}-sotest" testEnv' ''
|
||||||
cp ${image} image.elf
|
cp "${testPkgs.bender}" bender
|
||||||
mkdir -p $out/nix-support
|
cp ${image} image.elf
|
||||||
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
|
mkdir -p $out/nix-support
|
||||||
bender image.elf
|
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
|
||||||
${apps.dhall-to-yaml.program} < ${
|
image.elf
|
||||||
./sotest_hw_config.dhall
|
${apps.dhall-to-yaml.program} < ${
|
||||||
} > "$out/sotest_config.yaml"
|
./sotest_hw_config.dhall
|
||||||
echo file zip $out/binaries.zip >> "$out/nix-support/hydra-build-products"
|
} > "$out/sotest_config.yaml"
|
||||||
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'';
|
''run_genode_until {[init] child "harness" exited with exit value 0} 60'';
|
||||||
|
|
||||||
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
|
||||||
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], ... }@t:
|
, testInputs ? [ ], testEnv ? { }, qemuArgs ? [ ], sotest ? false, ... }@t:
|
||||||
let
|
let
|
||||||
manifest = lib.mergeManifests (map addManifest (with testPkgs;
|
manifest = lib.mergeManifests (map addManifest (with testPkgs;
|
||||||
[ base-nova (genodeSources.make "init") sotest-producer ]
|
[ base-nova (genodeSources.make "init") sotest-producer ]
|
||||||
|
@ -143,19 +143,22 @@ let
|
||||||
|
|
||||||
iso = apps.nova-iso.function testEnv' "${testConfig'}";
|
iso = apps.nova-iso.function testEnv' "${testConfig'}";
|
||||||
|
|
||||||
sotest = buildPackages.runCommand "nova-${name}-sotest" testEnv' ''
|
sotest = if sotest then
|
||||||
cp "${testPkgs.bender}" bender
|
buildPackages.runCommand "nova-${name}-sotest" testEnv' ''
|
||||||
cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor
|
cp "${testPkgs.bender}" bender
|
||||||
cp ${image} image.elf
|
cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor
|
||||||
mkdir -p $out/nix-support
|
cp ${image} image.elf
|
||||||
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
|
mkdir -p $out/nix-support
|
||||||
bender hypervisor image.elf
|
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
|
||||||
${apps.dhall-to-yaml.program} < ${
|
hypervisor image.elf
|
||||||
./sotest_config.dhall
|
${apps.dhall-to-yaml.program} < ${
|
||||||
} > "$out/sotest_config.yaml"
|
./sotest_nova_config.dhall
|
||||||
echo file zip $out/binaries.zip >> "$out/nix-support/hydra-build-products"
|
} > "$out/sotest_config.yaml"
|
||||||
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 = [
|
tests = [
|
||||||
{
|
{
|
||||||
name = "multi";
|
name = "multi";
|
||||||
|
sotest = true;
|
||||||
testConfig = "${./.}/solo5.dhall";
|
testConfig = "${./.}/solo5.dhall";
|
||||||
testInputs = map genodeMake [ "app/ping" ] ++ (map genodeDepot [
|
testInputs = map genodeMake [ "app/ping" ] ++ (map genodeDepot [
|
||||||
"ram_block"
|
"ram_block"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ boot_items =
|
{ boot_items =
|
||||||
[ { exec = "bender", load = [ "image.elf" ], name = "Genode base-hw" } ]
|
[ { 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"
|
, 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