diff --git a/tests/default.nix b/tests/default.nix index 99b622f..f95f1e3 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -24,10 +24,16 @@ let inherit apps system testPkgs hostPkgs lib depot; }).callTest; + sotest-nova = (call: ((tests call) // { pci = call ./pci.nix { }; })) + (import ./driver-sotest-nova.nix { + inherit apps system testPkgs hostPkgs lib depot; + }).callTest; + testsToList = tests: map (test: { inherit (test) name; value = test; }) (builtins.attrValues tests); -in with builtins; listToAttrs (concatLists (map (testsToList) [ linux nova ])) +in with builtins; +listToAttrs (concatLists (map (testsToList) [ linux nova sotest-nova ])) diff --git a/tests/driver-sotest-nova.nix b/tests/driver-sotest-nova.nix index 65d3c49..449aa8c 100644 --- a/tests/driver-sotest-nova.nix +++ b/tests/driver-sotest-nova.nix @@ -13,16 +13,14 @@ let SOTEST_PRODUCER_MANIFEST = testPkgs.sotest-producer.manifest; } // env; - image = apps.nova-image.function env' - "${./driver-nova-config.dhall} ${testConfig}"; - drv = hostPkgs.runCommand "nova-${name}-sotest" env' '' + ${apps.nova-image.program} image.elf \ + ${./driver-nova-config.dhall} ${testConfig} cp "${testPkgs.bender}" bender cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor - cp "${image}" image.elf mkdir -p $out/nix-support ${hostPkgs.zip}/bin/zip "$out/binaries.zip" \ - bender hypervisor-x86_64 image.elf + bender hypervisor image.elf ${apps.dhall-to-yaml.program} < ${ ./sotest_config.dhall } > "$out/sotest_config.yaml" @@ -31,7 +29,6 @@ let ''; in drv // { - inherit image; config = hostPkgs.runCommand (name + ".dhall") env' '' ${apps.dhall.program} <<< "(${ ./driver-nova-config.dhall diff --git a/tests/sotest_config.dhall b/tests/sotest_config.dhall new file mode 100644 index 0000000..373ad56 --- /dev/null +++ b/tests/sotest_config.dhall @@ -0,0 +1,8 @@ +{ boot_items = + [ { exec = "bender" + , load = [ "hypervisor serial novga iommu", "image.elf" ] + , name = "NOVA with Genode" + } + ] +, boot_panic_patterns = [ "Error: init", "PAGE-FAULT IN CORE" ] +}