mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-18 12:01:38 +03:00
3a293cc914
- translators can now enable unit tests via `generateUnitTestsForProjects`
28 lines
404 B
Nix
28 lines
404 B
Nix
{
|
|
self,
|
|
lib,
|
|
coreutils,
|
|
nix,
|
|
python3,
|
|
utils,
|
|
dream2nixWithExternals,
|
|
...
|
|
}: let
|
|
l = lib // builtins;
|
|
|
|
pythonEnv = python3.withPackages (ps:
|
|
with ps; [
|
|
pytest
|
|
pytest-xdist
|
|
]);
|
|
in
|
|
utils.writePureShellScript
|
|
[
|
|
coreutils
|
|
nix
|
|
]
|
|
''
|
|
export dream2nixSrc=${dream2nixWithExternals}
|
|
${pythonEnv}/bin/pytest ${self}/tests/unit -n $(nproc) -v "$@"
|
|
''
|