diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2025-11-26 21:38:01 +0100 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-11-28 22:17:37 +0100 |
| commit | c11cf4ea1822b280be7873c61c004d23627b0349 (patch) | |
| tree | 2034775aa1218705b72b75ff579e86dc8b894117 /test | |
| parent | b100f6e64074c761327e1113a0c8afaf74091a23 (diff) | |
Well-defined order of dependencies in job ID
Diffstat (limited to 'test')
| -rw-r--r-- | test/asset/run/many_repos.yaml | 23 | ||||
| -rw-r--r-- | test/script/run.et | 67 |
2 files changed, 90 insertions, 0 deletions
diff --git a/test/asset/run/many_repos.yaml b/test/asset/run/many_repos.yaml new file mode 100644 index 0000000..63f8fa2 --- /dev/null +++ b/test/asset/run/many_repos.yaml @@ -0,0 +1,23 @@ +repo r1: +repo r2: +repo r3: +repo r4: + +job first: + checkout: + - repo: r1 + dest: d1 + - repo: r4 + dest: d4b + - repo: r3 + dest: d3 + - repo: r2 + dest: d2 + - repo: r4 + dest: d4 + + shell: + - touch some_file + + artifact out: + path: some_file diff --git a/test/script/run.et b/test/script/run.et index f33c2fa..9fbfd13 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -400,3 +400,70 @@ test RunRerun: flush from p matching /note .*/ expect /(.*)/ from p capture done guard (done == "run-finish") + + +test RunWithManyRepos: + node n + shell on n as git_init: + mkdir -p main + git -C main -c init.defaultBranch=master init -q + cp "${scripts.path}/many_repos.yaml" main/minici.yaml + git -C main add minici.yaml + git -C main -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + git -C main rev-parse HEAD + git -C main rev-parse HEAD^{tree} + + mkdir -p dir_r1 + git -C dir_r1 -c init.defaultBranch=master init -q + git -C dir_r1 -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + touch dir_r1/file_r1 + git -C dir_r1 add file_r1 + git -C dir_r1 -c user.name=test -c user.email=test commit -q --allow-empty -m 'commit r1' + git -C dir_r1 rev-parse HEAD + git -C dir_r1 rev-parse HEAD^{tree} + + mkdir -p dir_r2 + git -C dir_r2 -c init.defaultBranch=master init -q + git -C dir_r2 -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + touch dir_r2/file_r2 + git -C dir_r2 add file_r2 + git -C dir_r2 -c user.name=test -c user.email=test commit -q --allow-empty -m 'commit r2' + git -C dir_r2 rev-parse HEAD + git -C dir_r2 rev-parse HEAD^{tree} + + mkdir -p dir_r3 + git -C dir_r3 -c init.defaultBranch=master init -q + git -C dir_r3 -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + touch dir_r3/file_r3 + git -C dir_r3 add file_r3 + git -C dir_r3 -c user.name=test -c user.email=test commit -q --allow-empty -m 'commit r3' + git -C dir_r3 rev-parse HEAD + git -C dir_r3 rev-parse HEAD^{tree} + + mkdir -p dir_r4 + git -C dir_r4 -c init.defaultBranch=master init -q + git -C dir_r4 -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + touch dir_r4/file_r4 + git -C dir_r4 add file_r4 + git -C dir_r4 -c user.name=test -c user.email=test commit -q --allow-empty -m 'commit r4' + git -C dir_r4 rev-parse HEAD + git -C dir_r4 rev-parse HEAD^{tree} + + expect /([0-9a-f]+)/ from git_init capture mc + expect /([0-9a-f]+)/ from git_init capture mt + expect /([0-9a-f]+)/ from git_init capture r1c + expect /([0-9a-f]+)/ from git_init capture r1t + expect /([0-9a-f]+)/ from git_init capture r2c + expect /([0-9a-f]+)/ from git_init capture r2t + expect /([0-9a-f]+)/ from git_init capture r3c + expect /([0-9a-f]+)/ from git_init capture r3t + expect /([0-9a-f]+)/ from git_init capture r4c + expect /([0-9a-f]+)/ from git_init capture r4t + + local: + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "./main", "run", "--rerun-all", "first" ] + expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" + + local: + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "./main", "run", "--rerun-all", "$mc.first.$r1c.$r2t.$r3c.$r4t" ] + expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" |