atagen

roundabout

public
Star0
Watch0
caac091f257ad8d53409925aac0d377b716994f8
1
ssh://brewery@pls.lobotomise.me:33/atagen/roundabout.git
nix/omp-tests.nixNix32 lines588 B
1
{
2
  lib,
3
  nodejs,
4
  nushell,
5
  runCommand,
6
  writeScript,
7
  roundabout,
8
}:
9
10
let
11
  source = lib.fileset.toSource {
12
    root = ../.;
13
    fileset = lib.fileset.unions [
14
      ../tests
15
      ../plugin/omp
16
    ];
17
  };
18
  mockCli = writeScript "roundabout-test-cli" ''
19
    #!${lib.getExe nushell} --stdin
20
    ${builtins.readFile ../tests/mock-rabt.nu}
21
  '';
22
in
23
runCommand "roundabout-omp-tests"
24
  {
25
    nativeBuildInputs = [ nodejs ];
26
    ROUNDABOUT_TEST_CLI = mockCli;
27
    ROUNDABOUT_TEST_RABT = lib.getExe roundabout;
28
  }
29
  ''
30
    node --test ${source}/tests/omp.test.mjs
31
    touch $out
32
  ''