Skip to content

Commit

Permalink
nix: Test building for more configurations
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin committed Apr 20, 2024
1 parent 614d91c commit 60b3dc2
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
45 changes: 39 additions & 6 deletions hacking/nix/scope/worlds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ in rec {
qemu-arm-virt =
let
mk =
{ smp ? false
{ verificationBuild ? null
, debugBuild ? null
, printing ? null
, benchmarks ? null

, smp ? false
, mcs ? false
, el2 ? true
, hypervisor ? false
Expand All @@ -53,16 +58,22 @@ in rec {
KernelPlatform = mkString "qemu-arm-virt";
KernelMaxNumNodes = mkString numCores;
KernelIsMCS = fromBool mcs;

} // lib.optionalAttrs hypervisor {
KernelArmHypervisorSupport = on;
} // lib.optionalAttrs (verificationBuild != null) {
KernelVerificationBuild = fromBool verificationBuild;
} // lib.optionalAttrs (debugBuild != null) {
KernelDebugBuild = fromBool debugBuild;
} // lib.optionalAttrs (printing != null) {
KernelPrinting = fromBool printing;
} // lib.optionalAttrs (benchmarks != null) {
KernelBenchmarks = mkString benchmarks;
};
# benchmarking config
# KernelDebugBuild = off;
# KernelBenchmarks = mkString "track_utilisation";
# KernelArmExportPMUUser = on;
# KernelSignalFastpath = on;

} // lib.optionalAttrs hypervisor {
KernelArmHypervisorSupport = on;
};
canSimulate = true;
mkInstanceForPlatform = platUtils.qemu.mkMkInstanceForPlatform {
mkQemuCmd = loader: [
Expand All @@ -88,6 +99,28 @@ in rec {
cpu = "cortex-a53";
mkSeL4KernelLoaderWithPayloadArgs = loader: [ "-device" "loader,file=${loader},addr=0x70000000,cpu-num=0" ];
};

forBuildTests = {
noPrinting = mk {
debugBuild = true;
printing = false;
};
noDebug = mk {
debugBuild = false;
printing = true;
};
verification = mk {
verificationBuild = true;
};
bench = mk {
verificationBuild = true;
benchmarks = "track_utilisation";
};
debugBench = mk {
debugBuild = true;
benchmarks = "track_utilisation";
};
};
};

bcm2711 = mkWorld {
Expand Down
8 changes: 8 additions & 0 deletions hacking/nix/top-level/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ in {
pkgs.host.x86_64.none.this.worlds.default
];

someConfigurationBuildTests =
let
worlds = pkgs.host.aarch64.none.this.worlds.qemu-arm-virt.forBuildTests;
in
map (world: world.sel4-capdl-initializer) (lib.attrValues worlds);

sel4testInstances = (lib.mapAttrs (k: v: v.this.sel4test.automate) {
aarch64 = pkgs.host.aarch64.none;
aarch32 = pkgs.host.aarch32.none;
Expand Down Expand Up @@ -50,6 +56,8 @@ in {
map (instance: instance.links) world.instances.all
))

someConfigurationBuildTests

sel4testInstancesList

pkgs.host.aarch32.none.this.worlds.default.seL4
Expand Down

0 comments on commit 60b3dc2

Please sign in to comment.