diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2025-06-29 08:58:37 +0200 | 
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2025-06-29 10:16:30 +0200 | 
| commit | f1beff8cdbf5a2e54ea5e36b6edf337fc45ffc8b (patch) | |
| tree | 16bc4f7fc8e6a73e1af5e0c157ae75a74dac3cfa /test/script | |
| parent | 126d17c96fe0730e4ae8775ca2cd4f666b6e7d61 (diff) | |
Gather related jobs passed by refs to jobsets
Diffstat (limited to 'test/script')
| -rw-r--r-- | test/script/run.et | 55 | 
1 files changed, 55 insertions, 0 deletions
| diff --git a/test/script/run.et b/test/script/run.et index b6dc1b0..5531707 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -228,3 +228,58 @@ test RunExplicitJob:              cat list              rm list          expect /c d/ from s + + +test RunExplicitDependentJob: +    node n +    shell on n as git_init: +        mkdir -p main +        git -C main -c init.defaultBranch=master init -q +        cp "${scripts.path}/dependencies.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' + +        mkdir -p main/subdir + +        touch main/subdir/a +        git -C main add subdir +        git -C main -c user.name=test -c user.email=test commit -q -m 'commit' +        git -C main rev-parse HEAD^{commit} +        git -C main rev-parse HEAD^{tree} + +        touch main/subdir/b +        git -C main add subdir +        git -C main -c user.name=test -c user.email=test commit -q -m 'commit' +        git -C main rev-parse HEAD^{tree} + +        rm main/subdir/a +        rm main/subdir/b +        touch main/subdir/c +        git -C main add subdir +        git -C main -c user.name=test -c user.email=test commit -q -m 'commit' +        git -C main rev-parse HEAD^{tree} + +        touch main/subdir/d +        git -C main add subdir +        git -C main -c user.name=test -c user.email=test commit -q -m 'commit' +        git -C main 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 + +    local: +        spawn on n as p args [ "./main", "run", "$c1.first", "$t2.first", "$t3.second", "$c1.fifth", "$c1.fourth", "$c1.third", "$c1.second" ] +        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 "$t2.first" +        expect from p /job-finish $t3.second error/ + +        flush from p matching /note .*/ +        expect /(.*)/ from p capture done +        guard (done == "run-finish") |