# SPDX-License-Identifier: CC0-1.0 let tests = call: { log = call ./log.nix { }; }; in { apps, buildPackages, depot, genodepkgs, lib, nixpkgs }: let testPkgs = genodepkgs; addManifest = drv: drv // { manifest = nixpkgs.runCommand "${drv.name}.dhall" { inherit drv; } '' set -eu echo -n '[' >> $out find $drv/ -type f -printf ',{mapKey= "%f",mapValue="%p"}' >> $out echo -n ']' >> $out ''; }; linux = (call: ((tests call) // { block_router = call ./block_router.nix { }; })) (import ./driver-linux.nix { inherit apps addManifest buildPackages depot lib nixpkgs testPkgs; }).callTest; nova = (call: ((tests call) // { driver_manager = call ./driver_manager.nix { }; noux = call ./noux.nix { }; vmm = call ./vmm_x86.nix { }; x86 = call ./x86.nix { }; } // call ./solo5 { })) (import ./driver-nova.nix { inherit apps addManifest buildPackages depot lib nixpkgs testPkgs; }).callTest; hw = (call: ((tests call) // { # noux = call ./noux.nix { }; x86 = call ./x86.nix { }; } // call ./solo5 { })) (import ./driver-hw.nix { inherit apps addManifest buildPackages depot lib nixpkgs testPkgs; }).callTest; testsToList = tests: map (test: { inherit (test) name; value = test; }) (builtins.attrValues tests); hw-sotest = map ({ name, value }: { name = name + "-sotest"; value = value.sotest; }) (builtins.filter ({ name, value }: !isNull value.sotest) (testsToList hw)); nova-sotest = map ({ name, value }: { name = name + "-sotest"; value = value.sotest; }) (builtins.filter ({ name, value }: !isNull value.sotest) (testsToList nova)); in with builtins; listToAttrs ((concatLists (map (testsToList) [ linux hw nova ])) ++ hw-sotest ++ nova-sotest)