test.nix 849 Bytes
Newer Older
1
{ pkgs ? import <nixpkgs> {},
2
  testName ? "base",
3
  argotest-override ? null,
Valentin Reis's avatar
Valentin Reis committed
4
  argotk-override ? null,
5 6 7
  nrm-override ? null,
  containers-override ? null,
  libnrm-override ? null
8 9
}:
let
10 11
  argotest-src = spec:   if (isNull argotest-override)   then spec.argotest.src   else argotest-override;
  testEnv = spec: (import (argotest-src spec) {
12
        nrm-src        = if (isNull nrm-override)        then spec.nrm.src        else nrm-override;
Valentin Reis's avatar
Valentin Reis committed
13
        argotk-src     = if (isNull argotk-override)     then spec.argotk.src     else argotk-override;
14 15
        libnrm-src     = if (isNull libnrm-override)     then spec.libnrm.src     else libnrm-override;
        containers-src = if (isNull containers-override) then spec.containers.src else containers-override;
16
      });
17 18
  allTests = import ./tests/default.nix {};
in testEnv allTests."${testName}"