2
0
Fork 0

Cleanup checks

tftp
Emery Hemingway 3 years ago
parent 02f16c0436
commit 33d866c5e7

@ -58,11 +58,11 @@
overlay = import ./overlay;
lib = forAllCrossSystems ({ system, localSystem, crossSystem }:
(nixpkgs.lib) // (import ./lib {
nixpkgs.lib // (import ./lib {
inherit system localSystem crossSystem;
apps = self.apps.${system};
nixpkgs = nixpkgsFor.${system};
genodepkgs = self;
nixpkgs = nixpkgsFor.${system};
}));
legacyPackages = forAllSystems
@ -120,11 +120,12 @@
checks = let
checks' = forAllCrossSystems ({ system, localSystem, crossSystem }:
import ./tests {
inherit system localSystem crossSystem;
inherit self nixpkgs genode-depot;
apps = self.apps.${system};
lib = self.lib.${system};
buildPackages = nixpkgsFor.${localSystem};
depot = genode-depot.packages.${system};
genodepkgs = self.packages.${system};
lib = self.lib.${system};
nixpkgs = nixpkgsFor.${system};
});
in checks' // { x86_64-linux = checks'.x86_64-linux-x86_64-genode; };
};

@ -1,6 +1,6 @@
# SPDX-License-Identifier: CC0-1.0
{ testEnv, pkgs, buildPkgs, ... }:
{ testEnv, pkgs, buildPackages, ... }:
with pkgs;
testEnv.mkTest {
@ -15,7 +15,7 @@ testEnv.mkTest {
] ++ [ pkgs.block_router ];
testScript = ''
catch { exec dd if=/dev/zero of=gpt.raw bs=512 count=7168 }
exec ${buildPkgs.gptfdisk}/bin/sgdisk -o -n 3:2048:4095 -c 3:first-test-partition -n 31:4096:6143 -c 31:second-test-partition gpt.raw
exec ${buildPackages.gptfdisk}/bin/sgdisk -o -n 3:2048:4095 -c 3:first-test-partition -n 31:4096:6143 -c 31:second-test-partition gpt.raw
run_genode_until {Tests finished successfully.*\n.*Tests finished successfully.*\n} 120
'';

@ -7,17 +7,14 @@ let
signal = call ./signal.nix { };
} // call ./solo5 { };
in { self, apps, system, localSystem, crossSystem, genodepkgs, nixpkgs
, genode-depot, lib }:
in { apps, buildPackages, depot, genodepkgs, lib, nixpkgs }:
let
buildPkgs = import nixpkgs { system = localSystem; };
depot = genode-depot.packages.${system};
testPkgs = genodepkgs;
addManifest = drv:
drv // {
manifest = buildPkgs.runCommand "${drv.name}.dhall" { inherit drv; } ''
manifest = nixpkgs.runCommand "${drv.name}.dhall" { inherit drv; } ''
set -eu
echo -n '[' >> $out
find $drv/ -type f -printf ',{mapKey= "%f",mapValue="%p"}' >> $out
@ -28,7 +25,7 @@ let
linux =
(call: ((tests call) // { block_router = call ./block_router.nix { }; }))
(import ./driver-linux.nix {
inherit apps testPkgs buildPkgs lib depot addManifest;
inherit apps addManifest buildPackages depot lib nixpkgs testPkgs;
}).callTest;
nova = (call:
@ -38,7 +35,7 @@ let
pci = call ./pci.nix { };
rtc = call ./rtc.nix { };
})) (import ./driver-nova.nix {
inherit apps system testPkgs buildPkgs lib depot addManifest;
inherit apps addManifest buildPackages depot lib nixpkgs testPkgs;
}).callTest;
hw = (call:
@ -47,7 +44,7 @@ let
pci = call ./pci.nix { };
rtc = call ./rtc.nix { };
})) (import ./driver-hw.nix {
inherit apps system testPkgs buildPkgs lib depot addManifest;
inherit apps addManifest buildPackages depot lib nixpkgs testPkgs;
}).callTest;
testsToList = tests:

@ -1,9 +1,9 @@
# SPDX-License-Identifier: CC0-1.0
{ system, apps, testPkgs, buildPkgs, lib, depot, addManifest }:
{ addManifest, apps, buildPackages, depot, lib, nixpkgs, testPkgs }:
let
testDriver = with buildPkgs;
testDriver = with buildPackages;
stdenv.mkDerivation {
name = "hw-genode-test-driver";
preferLocalBuild = true;
@ -20,7 +20,7 @@ let
};
runTests = driver:
buildPkgs.stdenv.mkDerivation {
buildPackages.stdenv.mkDerivation {
name = "hw-" + driver.testName;
preferLocalBuild = true;
@ -91,7 +91,7 @@ let
global env
global spawn_id
set TEST_MIB [expr (([file size ${image}] + $env(TEST_RAM)) >> 20) + 24]
spawn ${buildPkgs.qemu_test}/bin/qemu-system-x86_64 \
spawn ${buildPackages.qemu_test}/bin/qemu-system-x86_64 \
-machine q35 -serial mon:stdio -nographic \
-m size=$TEST_MIB \
-kernel "${testPkgs.bender}" \
@ -105,7 +105,7 @@ let
set out $env(out)
'';
driver = with buildPkgs;
driver = with buildPackages;
buildPackages.runCommand "genode-test-driver-${name}" ({
buildInputs = [ makeWrapper expect ];
inherit baseSetup testScript;
@ -133,20 +133,20 @@ let
in test // {
inherit driver image test manifest;
config = buildPkgs.runCommand (name + ".dhall") testEnv' ''
config = buildPackages.runCommand (name + ".dhall") testEnv' ''
${apps.dhall.program} <<< "${testConfig'}" > $out
'';
iso = apps.hw-iso.function testEnv' testConfig';
xml = buildPkgs.runCommand (name + ".config") testEnv'
xml = buildPackages.runCommand (name + ".config") testEnv'
''${apps.render-init.program} <<< "(${testConfig'}).config" > $out'';
sotest = buildPkgs.runCommand "hw-${name}-sotest" testEnv' ''
sotest = buildPackages.runCommand "hw-${name}-sotest" testEnv' ''
cp "${testPkgs.bender}" bender
cp ${image} image.elf
mkdir -p $out/nix-support
${buildPkgs.zip}/bin/zip "$out/binaries.zip" \
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
bender image.elf
${apps.dhall-to-yaml.program} < ${
./sotest_hw_config.dhall
@ -166,6 +166,6 @@ in {
isNova = true;
};
pkgs = testPkgs;
inherit depot buildPkgs;
inherit nixpkgs depot buildPackages;
} // args));
}

@ -1,9 +1,9 @@
# SPDX-License-Identifier: CC0-1.0
{ apps, testPkgs, buildPkgs, lib, depot, addManifest }:
{ addManifest, apps, buildPackages, depot, lib, nixpkgs, testPkgs }:
let
testDriver = with buildPkgs;
testDriver = with buildPackages;
stdenv.mkDerivation {
name = "genode-test-driver";
preferLocalBuild = true;
@ -20,7 +20,7 @@ let
};
runTests = driver:
buildPkgs.stdenv.mkDerivation {
buildPackages.stdenv.mkDerivation {
name = "linux-" + driver.testName;
preferLocalBuild = true;
@ -80,7 +80,7 @@ let
}
'';
driver = with buildPkgs;
driver = with buildPackages;
runCommand "genode-test-driver-${name}" {
buildInputs = [ makeWrapper expect ];
inherit baseSetup testScript;
@ -100,13 +100,13 @@ let
in test // {
inherit build driver test;
config = buildPkgs.runCommand (name + ".dhall") env' ''
config = buildPackages.runCommand (name + ".dhall") env' ''
${apps.dhall.program} <<< "(${testConfig'}).config" > $out
'';
xml = buildPkgs.runCommand (name + ".config") env' ''
xml = buildPackages.runCommand (name + ".config") env' ''
${apps.render-init.program} <<< "(${testConfig'}).config" > $out
'';
image = buildPkgs.runCommand (name + ".image.elf") env' ''
image = buildPackages.runCommand (name + ".image.elf") env' ''
mkdir -p $out
pushd $out
. ${build}/script
@ -122,6 +122,6 @@ in {
isNova = false;
};
pkgs = testPkgs;
inherit depot buildPkgs;
inherit nixpkgs depot buildPackages;
} // args));
}

@ -1,9 +1,9 @@
# SPDX-License-Identifier: CC0-1.0
{ system, apps, testPkgs, buildPkgs, lib, depot, addManifest }:
{ addManifest, apps, buildPackages, depot, lib, nixpkgs, testPkgs }:
let
testDriver = with buildPkgs;
testDriver = with buildPackages;
stdenv.mkDerivation {
name = "nova-genode-test-driver";
preferLocalBuild = true;
@ -20,7 +20,7 @@ let
};
runTests = driver:
buildPkgs.stdenv.mkDerivation {
buildPackages.stdenv.mkDerivation {
name = "nova-" + driver.testName;
preferLocalBuild = true;
@ -92,7 +92,7 @@ let
global env
global spawn_id
set TEST_MIB [expr (([file size ${image}] + $env(TEST_RAM)) >> 20) + 24]
spawn ${buildPkgs.qemu_test}/bin/qemu-system-x86_64 \
spawn ${buildPackages.qemu_test}/bin/qemu-system-x86_64 \
-machine q35 -serial mon:stdio -nographic \
-m size=$TEST_MIB \
-kernel "${testPkgs.bender}" \
@ -106,7 +106,7 @@ let
set out $env(out)
'';
driver = with buildPkgs;
driver = with buildPackages;
buildPackages.runCommand "genode-test-driver-${name}" ({
buildInputs = [ makeWrapper expect ];
inherit baseSetup testScript;
@ -134,7 +134,7 @@ let
in test // {
inherit build driver image test manifest;
config = buildPkgs.runCommand (name + ".dhall") testEnv' ''
config = buildPackages.runCommand (name + ".dhall") testEnv' ''
${apps.dhall.program} <<< "${testConfig'}" > $out
'';
@ -142,12 +142,12 @@ let
iso = apps.nova-iso.function testEnv' "${testConfig'}";
sotest = buildPkgs.runCommand "nova-${name}-sotest" testEnv' ''
sotest = buildPackages.runCommand "nova-${name}-sotest" testEnv' ''
cp "${testPkgs.bender}" bender
cp "${testPkgs.NOVA}/hypervisor-x86_64" hypervisor
cp ${image} image.elf
mkdir -p $out/nix-support
${buildPkgs.zip}/bin/zip "$out/binaries.zip" \
${buildPackages.zip}/bin/zip "$out/binaries.zip" \
bender hypervisor image.elf
${apps.dhall-to-yaml.program} < ${
./sotest_config.dhall
@ -167,6 +167,6 @@ in {
isNova = true;
};
pkgs = testPkgs;
inherit depot buildPkgs;
inherit nixpkgs depot buildPackages;
} // args));
}

@ -1,6 +1,6 @@
# SPDX-License-Identifier: CC0-1.0
{ testEnv, pkgs, depot, buildPkgs, ... }:
{ testEnv, pkgs, depot, buildPackages, ... }:
with pkgs;
testEnv.mkTest {
@ -27,7 +27,7 @@ testEnv.mkTest {
testScript = ''
catch { exec dd if=/dev/zero of=hdd_disk.raw bs=1M count=32 }
catch { exec ${buildPkgs.e2fsprogs}/bin/mke2fs -F bin/hdd_disk.raw }
catch { exec ${buildPackages.e2fsprogs}/bin/mke2fs -F bin/hdd_disk.raw }
run_genode_until {.*all expected devices present and accessible.*} 120
'';
testConfig = ./driver_manager.dhall;

Loading…
Cancel
Save