mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
fix: ensure e2e tests are collected in order
This commit is contained in:
parent
806a3d759e
commit
a0ce293db8
1 changed files with 19 additions and 7 deletions
|
|
@ -22,13 +22,25 @@ let
|
||||||
''
|
''
|
||||||
else t.script;
|
else t.script;
|
||||||
|
|
||||||
tests = pkgs.linkFarm "${testing.name}-tests" (
|
tests = let
|
||||||
map
|
# make sure tests are prefixed so that alphanumerical
|
||||||
(t: {
|
# sorting reproduces them in the same order as they
|
||||||
|
# have been declared in the list.
|
||||||
|
seive = t: t.script != null && t.enabled;
|
||||||
|
allEligibleTests = filter seive testing.tests;
|
||||||
|
listLengthPadding = builtins.length (
|
||||||
|
lib.stringToCharacters (
|
||||||
|
builtins.toString (
|
||||||
|
builtins.length allEligibleTests)));
|
||||||
|
op =
|
||||||
|
(i: t: {
|
||||||
path = toTestScript t;
|
path = toTestScript t;
|
||||||
name = "${t.name}_test.py";
|
name = let
|
||||||
})
|
prefix = lib.fixedWidthNumber listLengthPadding i;
|
||||||
(filter (t: t.script != null) testing.tests)
|
in "${prefix}_${t.name}_test.py";
|
||||||
|
});
|
||||||
|
in pkgs.linkFarm "${testing.name}-tests" (
|
||||||
|
lib.imap0 op allEligibleTests;
|
||||||
);
|
);
|
||||||
|
|
||||||
testScript = pkgs.writeScript "test-${testing.name}.sh" ''
|
testScript = pkgs.writeScript "test-${testing.name}.sh" ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue