clan-cli: Add passthru.sourceWithTest for container_test.py
This commit is contained in:
@@ -62,6 +62,6 @@ in
|
||||
peer1.succeed("chmod 640 /var/log/journal/*/user-1000.journal*")
|
||||
|
||||
# Run tests as text-user (environment variables are set automatically)
|
||||
peer1.succeed("su - text-user -c 'pytest -s -n0 ${cli}/${cli.pythonRuntime.sitePackages}/clan_lib/service_runner'")
|
||||
peer1.succeed("su - text-user -c 'pytest -p no:cacheprovider -o addopts="" -s -n0 ${cli.passthru.sourceWithTests}/clan_lib/service_runner'")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -103,7 +103,6 @@ let
|
||||
_root: path: _type:
|
||||
(builtins.match ".*/test_[^/]+\.py" path) != null # matches test_*.py
|
||||
&& (builtins.match ".*/[^/]+_test\.py" path) != null # matches *_test.py
|
||||
&& (builtins.match ".*/container_test\.py" path) == null # doesn't match container_test.py
|
||||
)
|
||||
];
|
||||
}
|
||||
@@ -301,6 +300,7 @@ pythonRuntime.pkgs.buildPythonApplication {
|
||||
passthru.runtimeDependenciesMap = bundledRuntimeDependenciesMap;
|
||||
passthru.testRuntimeDependencies = testRuntimeDependencies;
|
||||
passthru.testRuntimeDependenciesMap = testRuntimeDependenciesMap;
|
||||
passthru.sourceWithTests = sourceWithTests;
|
||||
|
||||
# Nixpkgs doesn't get copied from `src` as it's not in `package-data` in `pyproject.toml`
|
||||
# as it significantly slows down the build so we copy it again here
|
||||
|
||||
Reference in New Issue
Block a user