summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/asset/run/dependencies.yaml27
-rw-r--r--test/script/run.et44
2 files changed, 55 insertions, 16 deletions
diff --git a/test/asset/run/dependencies.yaml b/test/asset/run/dependencies.yaml
index 7452b5a..13d5e63 100644
--- a/test/asset/run/dependencies.yaml
+++ b/test/asset/run/dependencies.yaml
@@ -1,3 +1,5 @@
+repo other:
+
job first:
shell:
- touch x
@@ -29,6 +31,11 @@ job third:
job fourth:
+ checkout:
+ - dest: a
+ - repo: other
+ dest: b
+
uses:
- second.out
@@ -40,16 +47,16 @@ job fourth:
job fifth:
- uses:
- - third.out
- - fourth.out
+ uses:
+ - third.out
+ - fourth.out
- shell:
- - mv z z2
- - mv w w2
+ shell:
+ - mv z z2
+ - mv w w2
- artifact out1:
- path: z2
+ artifact out1:
+ path: z2
- artifact out2:
- path: w2
+ artifact out2:
+ path: w2
diff --git a/test/script/run.et b/test/script/run.et
index 124ae37..f00a4a7 100644
--- a/test/script/run.et
+++ b/test/script/run.et
@@ -260,31 +260,63 @@ test RunExplicitDependentJob:
git -C main -c user.name=test -c user.email=test commit -q -m 'commit'
git -C main rev-parse HEAD^{tree}
+ mkdir -p other
+ git -C other -c init.defaultBranch=master init -q
+
+ mkdir -p other/subdir
+
+ touch other/subdir/a
+ git -C other add subdir
+ git -C other -c user.name=test -c user.email=test commit -q -m 'commit'
+ git -C other rev-parse HEAD^{tree}
+
+ touch other/subdir/b
+ git -C other add subdir
+ git -C other -c user.name=test -c user.email=test commit -q -m 'commit'
+ git -C other rev-parse HEAD^{tree}
+
+ rm other/subdir/a
+ rm other/subdir/b
+ touch other/subdir/c
+ git -C other add subdir
+ git -C other -c user.name=test -c user.email=test commit -q -m 'commit'
+ git -C other rev-parse HEAD^{tree}
+
+ touch other/subdir/d
+ git -C other add subdir
+ git -C other -c user.name=test -c user.email=test commit -q -m 'commit'
+ git -C other rev-parse HEAD^{tree}
+
expect /([0-9a-f]+)/ from git_init capture c1
expect /([0-9a-f]+)/ from git_init capture t1
expect /([0-9a-f]+)/ from git_init capture t2
expect /([0-9a-f]+)/ from git_init capture t3
expect /([0-9a-f]+)/ from git_init capture t4
+ expect /([0-9a-f]+)/ from git_init capture o1
+ expect /([0-9a-f]+)/ from git_init capture o2
+ expect /([0-9a-f]+)/ from git_init capture o3
+ expect /([0-9a-f]+)/ from git_init capture o4
+
local:
- spawn on n as p args [ "./main", "run", "$c1.first", "$t2.first", "$t3.fourth", "$c1.fifth", "$c1.fourth", "$c1.third", "$c1.second", "$t4.fifth" ]
+ spawn on n as p args [ "--repo=other:./other", "./main", "run", "$c1.first", "$t2.first", "$t3.fourth.$o3", "$c1.fifth.$o1", "$c1.fourth.$o1", "$c1.third", "$c1.second", "$t4.fifth.$o4" ]
expect_success from p of "$t1.first"
expect_success from p of "$t1.second"
expect_success from p of "$t1.third"
- expect_success from p of "$t1.fourth"
- expect_success from p of "$t1.fifth"
+ expect_success from p of "$t1.fourth.$o1"
+ expect_success from p of "$t1.fifth.$o1"
expect_success from p of "$t2.first"
expect_success from p of "$t3.first"
expect_success from p of "$t3.second"
- expect_success from p of "$t3.fourth"
+ expect_success from p of "$t3.fourth.$o3"
expect_success from p of "$t4.first"
expect_success from p of "$t4.second"
expect_success from p of "$t4.third"
- expect_success from p of "$t4.fourth"
- expect_success from p of "$t4.fifth"
+ expect_success from p of "$t4.fourth.$o4"
+ expect_success from p of "$t4.fifth.$o4"
flush from p matching /note .*/
flush from p matching /job-duplicate .*/