2
0
Fork 0

tests: initially format ROM manifests into maps

absolute-needed
Emery Hemingway 3 years ago
parent 3704785f69
commit 53afe72493
  1. 7
      lib/default.nix
  2. 2
      tests/driver-hw.nix
  3. 9
      tests/driver-linux.nix
  4. 2
      tests/driver-nova.nix

@ -127,10 +127,13 @@ in rec {
let
f = head: input:
if hasAttr "manifest" input then
"${head},${nixpkgs.lib.getName input}=${input.manifest}"
''
${head}, { mapKey = "${
nixpkgs.lib.getName input
}", mapValue = ${input.manifest} }''
else
abort "${input.pname} does not have a manifest";
in (foldl' f "{" inputs) + "}";
in (foldl' f "[" inputs) + "]";
};
}

@ -43,7 +43,7 @@ let
manifest = lib.mergeManifests (map addManifest (with testPkgs;
[ base-hw-pc sotest-producer ]
++ map genodeSources.depot [ "init" "rtc_drv" ] ++ testInputs));
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
testConfig' = "${./test-wrapper.dhall} (${testConfig}) ${manifest}";
testEnv' = {
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
DHALL_GENODE_TEST = "${./test.dhall}";

@ -34,13 +34,16 @@ let
'';
};
mkTest = { name ? "unamed", testScript, testConfig, testInputs ? [ ]
, env ? { }, ... }:
defaultScript =
''run_genode_until {child "init" exited with exit value 0} 120'';
mkTest = { name ? "unamed", testScript ? defaultScript, testConfig
, testInputs ? [ ], env ? { }, ... }:
with testPkgs;
let
manifest = lib.mergeManifests (map addManifest
((with testPkgs; [ base-linux init sotest-producer ] ++ testInputs)));
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
testConfig' = "${./test-wrapper.dhall} (${testConfig}) ${manifest}";
env' = {
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
DHALL_GENODE_TEST = "${./test.dhall}";

@ -43,7 +43,7 @@ let
manifest = lib.mergeManifests (map addManifest (with testPkgs;
[ base-nova sotest-producer ]
++ map genodeSources.depot [ "init" "rtc_drv" ] ++ testInputs));
testConfig' = "${./test-wrapper.dhall} ${testConfig} (toMap ${manifest})";
testConfig' = "${./test-wrapper.dhall} (${testConfig}) ${manifest}";
testEnv' = {
DHALL_GENODE = "${testPkgs.dhallGenode}/source.dhall";
DHALL_GENODE_TEST = "${./test.dhall}";

Loading…
Cancel
Save