2
0
Fork 0
Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
genodepkgs/tests/default.nix

44 lines
1.3 KiB

3 years ago
# SPDX-FileCopyrightText: Emery Hemingway
#
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
let
tests = call: {
fs_report = call ./fs_report.nix { };
libc = call ./libc.nix { };
log = call ./log.nix { };
signal = call ./signal.nix { };
solo5 = call ./solo5.nix { };
solo5-ping = call ./solo5-ping.nix { };
};
nixpkgs' = import ./../nixpkgs.nix;
in { nixpkgs ? nixpkgs' }:
3 years ago
let
hostPkgs = import nixpkgs { };
testPkgs = import ./.. { inherit nixpkgs; };
3 years ago
lib = hostPkgs.lib // {
3 years ago
renderDhallInit = path: args:
hostPkgs.runCommand "init.xml" {
buildInputs = [ testPkgs.buildPackages.linux-dhall ];
3 years ago
initConfig = path;
initArgs = args;
DHALL_PRELUDE = "${testPkgs.dhallPackages.prelude}/package.dhall";
DHALL_GENODE = "${testPkgs.dhallPackages.genode}/package.dhall";
3 years ago
} ''
export XDG_CACHE_HOME=$NIX_BUILD_TOP
echo 'let Prelude = env:DHALL_GENODE in Prelude.Init.render (Prelude.Init.defaults { children = toMap (env:initConfig env:initArgs) })' \
| dhall text \
3 years ago
> $out
'';
};
in {
linux = tests
(import ./driver-linux.nix { inherit testPkgs hostPkgs lib; }).callTest;
3 years ago
nova = tests
(import ./driver-nova.nix { inherit testPkgs hostPkgs lib; }).callTest;
3 years ago
}