From 8be8c74a318fd4bf27791a2024aee7fc121da588 Mon Sep 17 00:00:00 2001 From: Nick Spinale Date: Wed, 29 May 2024 22:58:19 +0000 Subject: [PATCH] nix: Run some unit tests in CI Signed-off-by: Nick Spinale --- hacking/nix/scope/default.nix | 15 +++++++++++++++ hacking/nix/top-level/default.nix | 2 ++ 2 files changed, 17 insertions(+) diff --git a/hacking/nix/scope/default.nix b/hacking/nix/scope/default.nix index 5c093a23f..8b9af45f5 100644 --- a/hacking/nix/scope/default.nix +++ b/hacking/nix/scope/default.nix @@ -197,6 +197,21 @@ superCallPackage ../rust-utils {} self // shellForMakefile = callPackage ./shell-for-makefile.nix {}; shellForHacking = callPackage ./shell-for-hacking.nix {}; + ### unit tests + + someUnitTests = buildCratesInLayers { + name = "some-unit-tests"; + test = true; + rootCrates = with crates; [ + sel4-bitfield-ops + sel4-kernel-loader-embed-page-tables + sel4-backtrace-types + ]; + features = [ + "sel4-backtrace-types/full" + ]; + }; + ### kernel mkSeL4 = callPackage ./sel4 {}; diff --git a/hacking/nix/top-level/default.nix b/hacking/nix/top-level/default.nix index b344e3f17..f09e2e99f 100644 --- a/hacking/nix/top-level/default.nix +++ b/hacking/nix/top-level/default.nix @@ -56,6 +56,8 @@ in { map (instance: instance.links) world.instances.all )) + pkgs.build.this.someUnitTests + someConfigurationBuildTests sel4testInstancesList