# SPDX-License-Identifier: CC0-1.0 { testEnv, pkgs, ... }: with pkgs; let defaultScript = '' run_genode_until {SUCCESS} 30 ''; mkTest' = { name, testConfig, testScript ? defaultScript, ... }@attrs: testEnv.mkTest (attrs // { name = "solo5-" + name; inherit testScript; testInputs = [ pkgs.solo5 pkgs.solo5.tests pkgs.driversPc ]; testConfig = "(${./boot-wrapper.dhall} ${testConfig})"; }); applyMkTest = x: { inherit (x) name; value = mkTest' x; }; mkTests = testList: builtins.listToAttrs (map applyMkTest testList); toSimple = name: "(${./simple.dhall} (env:MANIFEST).solo5-tests.bin.solo5-test_${name})"; tests = [ { name = "blk"; testConfig = ./blk.dhall; } { name = "fpu"; testConfig = toSimple "fpu"; } { name = "globals"; testConfig = toSimple "globals"; } { name = "hello"; testConfig = toSimple "hello"; } { name = "net"; testConfig = ./net.dhall; } { name = "net_2if"; testConfig = ./net_2if.dhall; } { name = "quiet"; testConfig = toSimple "quiet"; } { name = "ssp"; testConfig = toSimple "ssp"; testScript = '' run_genode_until {Error: stack protector check failed} 30 ''; } ] ++ (testEnv.lib.optional (!testEnv.isLinux) { name = "time"; testConfig = ./time.dhall; } ); in mkTests tests