diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/asset/run/many_repos.yaml | 46 | ||||
| -rw-r--r-- | test/script/run.et | 58 |
2 files changed, 98 insertions, 6 deletions
diff --git a/test/asset/run/many_repos.yaml b/test/asset/run/many_repos.yaml index ebf07d8..0839ba6 100644 --- a/test/asset/run/many_repos.yaml +++ b/test/asset/run/many_repos.yaml @@ -2,6 +2,7 @@ repo r1: repo r2: repo r3: repo r4: +repo r5: job first: checkout: @@ -49,6 +50,51 @@ job first_manual_revision: path: some_file +job second: + checkout: + - repo: r2 + dest: d2 + - repo: r5 + dest: d5 + - repo: r3 + dest: d3 + + shell: + - touch second_file + + artifact out: + path: second_file + + job dependent: uses: - first.out + + shell: + - mv some_file some_other_file + + artifact out: + path: some_other_file + + +job transitive: + uses: + - dependent.out + + artifact out: + path: some_other_file + + +job combined: + uses: + - first.out + - second.out + + artifact out: + path: second_file + + +job combined_transitive: + uses: + - combined.out + - transitive.out diff --git a/test/script/run.et b/test/script/run.et index 83104a0..99cce0b 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -461,6 +461,15 @@ test RunWithManyRepos: git -C dir_r4 rev-parse HEAD git -C dir_r4 rev-parse HEAD^{tree} + mkdir -p dir_r5 + git -C dir_r5 -c init.defaultBranch=master init -q + git -C dir_r5 -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + touch dir_r5/file_r5 + git -C dir_r5 add file_r5 + git -C dir_r5 -c user.name=test -c user.email=test commit -q --allow-empty -m 'commit r5' + git -C dir_r5 rev-parse HEAD + git -C dir_r5 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 @@ -471,41 +480,78 @@ test RunWithManyRepos: 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 + expect /([0-9a-f]+)/ from git_init capture r5c + expect /([0-9a-f]+)/ from git_init capture r5t 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" ] + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "first" ] expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" expect /(.*)/ from p capture done guard (done == "run-finish") 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" ] + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "$mc.first.$r1c.$r2t.$r3c.$r4t" ] expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" expect /(.*)/ from p capture done guard (done == "run-finish") 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_manual_revision" ] + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "first_manual_revision" ] expect_success from p of "$mt.first_manual_revision.$r1t.$r2t.$r4t" expect /(.*)/ from p capture done guard (done == "run-finish") 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_manual_revision.$r1c.$r2t.$r4t" ] + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "$mc.first_manual_revision.$r1c.$r2t.$r4t" ] expect_success from p of "$mt.first_manual_revision.$r1t.$r2t.$r4t" expect /(.*)/ from p capture done guard (done == "run-finish") 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", "dependent" ] + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "dependent" ] + expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.dependent.$r1t.$r2t.$r3t.$r4t" + expect /(.*)/ from p capture done + guard (done == "run-finish") + + 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", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "$mc.dependent.$r1c.$r2t.$r3c.$r4t" ] + expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.dependent.$r1t.$r2t.$r3t.$r4t" + expect /(.*)/ from p capture done + guard (done == "run-finish") + + 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", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "transitive" ] + expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.dependent.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.transitive.$r1t.$r2t.$r3t.$r4t" + expect /(.*)/ from p capture done + guard (done == "run-finish") + + 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", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "$mc.transitive.$r1c.$r2t.$r3c.$r4t" ] expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" expect_success from p of "$mt.dependent.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.transitive.$r1t.$r2t.$r3t.$r4t" + expect /(.*)/ from p capture done + guard (done == "run-finish") + + 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", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "combined" ] + expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.second.$r2t.$r3t.$r5t" + expect_success from p of "$mt.combined.$r1t.$r2t.$r3t.$r4t.$r5t" expect /(.*)/ from p capture done guard (done == "run-finish") 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.dependent.$r1c.$r2t.$r3c.$r4t" ] + spawn on n as p args [ "--storage=minici", "--repo=r1:./dir_r1", "--repo=r3:./dir_r3", "--repo=r4:./dir_r4", "--repo=r2:./dir_r2", "--repo=r5:./dir_r5", "./main", "run", "--rerun-all", "combined_transitive" ] expect_success from p of "$mt.first.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.second.$r2t.$r3t.$r5t" expect_success from p of "$mt.dependent.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.transitive.$r1t.$r2t.$r3t.$r4t" + expect_success from p of "$mt.combined.$r1t.$r2t.$r3t.$r4t.$r5t" + expect_success from p of "$mt.combined_transitive.$r1t.$r2t.$r3t.$r4t.$r5t" expect /(.*)/ from p capture done guard (done == "run-finish") |