|
|
|
@ -34,17 +34,17 @@ let
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
mkTest = { name ? "unamed", testScript, testConfig, env ? { }, qemuMem ? 32
|
|
|
|
|
, ... # TODO: remove ...
|
|
|
|
|
mkTest = { name ? "unamed", testScript, testConfig, testInputs ? [ ]
|
|
|
|
|
, env ? { }, qemuMem ? 32, ... # TODO: remove ...
|
|
|
|
|
}@t:
|
|
|
|
|
let
|
|
|
|
|
manifest = lib.mergeManifests (with testPkgs;
|
|
|
|
|
[ genode.base genode.base-nova genode.os sotest-producer ]
|
|
|
|
|
++ testInputs);
|
|
|
|
|
env' = {
|
|
|
|
|
DHALL_PRELUDE = "${testPkgs.dhallPrelude}/package.dhall";
|
|
|
|
|
DHALL_GENODE = "${testPkgs.dhallGenode}/package.dhall";
|
|
|
|
|
BASE_MANIFEST = testPkgs.genode.base.manifest;
|
|
|
|
|
BASE_NOVA_MANIFEST = testPkgs.genode.base-nova.manifest;
|
|
|
|
|
OS_MANIFEST = testPkgs.genode.os.manifest;
|
|
|
|
|
SOTEST_PRODUCER_MANIFEST = testPkgs.sotest-producer.manifest;
|
|
|
|
|
MANIFEST = manifest;
|
|
|
|
|
} // env;
|
|
|
|
|
|
|
|
|
|
iso = apps.nova-iso.function env'
|
|
|
|
@ -127,24 +127,23 @@ let
|
|
|
|
|
test = passMeta (runTests driver);
|
|
|
|
|
|
|
|
|
|
in test // {
|
|
|
|
|
inherit driver iso test;
|
|
|
|
|
inherit driver iso test manifest;
|
|
|
|
|
|
|
|
|
|
config = hostPkgs.runCommand (name + ".dhall") env' ''
|
|
|
|
|
export XDG_CACHE_HOME=${TMPDIR:-/tmp}
|
|
|
|
|
${apps.dhall.program} <<< "(${
|
|
|
|
|
./driver-nova-config.dhall
|
|
|
|
|
} ${testConfig})" > $out
|
|
|
|
|
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
|
|
|
|
${apps.dhall.program} <<< \
|
|
|
|
|
"(${./driver-nova-config.dhall} ${testConfig})" > $out
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
xml = hostPkgs.runCommand (name + ".config") env' ''
|
|
|
|
|
export XDG_CACHE_HOME=${TMPDIR:-/tmp}
|
|
|
|
|
${apps.render-init.program} "(${
|
|
|
|
|
./driver-nova-config.dhall
|
|
|
|
|
} ${testConfig}).config" > $out'';
|
|
|
|
|
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
|
|
|
|
${apps.render-init.program} \
|
|
|
|
|
"(${./driver-nova-config.dhall} ${testConfig}).config" > $out'';
|
|
|
|
|
|
|
|
|
|
sotest = hostPkgs.runCommand "nova-${name}-sotest" env' ''
|
|
|
|
|
export XDG_CACHE_HOME=${TMPDIR:-/tmp}
|
|
|
|
|
${apps.nova-image.program} image.elf "${./driver-nova-config.dhall} ${testConfig}"
|
|
|
|
|
export XDG_CACHE_HOME=''${TMPDIR:-/tmp}
|
|
|
|
|
${apps.nova-image.program} \
|
|
|
|
|
image.elf "${./driver-nova-config.dhall} ${testConfig}"
|
|
|
|
|
cp "${testPkgs.bender}" bender
|
|
|
|
|
cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor
|
|
|
|
|
mkdir -p $out/nix-support
|
|
|
|
|