From fe1da1f16884ea1e3b1c3faedbe336d94ee3a386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 6 Nov 2025 20:54:41 +0100 Subject: Reuse job status and artifacts Changelog: Reuse job status and artifacts from previous runs --- test/script/run.et | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'test/script') diff --git a/test/script/run.et b/test/script/run.et index 08cee71..86828ec 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -10,9 +10,18 @@ def expect_result from p of job result result: /job-finish $job ([a-z]+)/ capture done guard (done == result) +def expect_previous_result from p of job result result: + let dummy = job == "" # TODO: forces string type + expect from p: + /job-previous $job ([a-z]+)/ capture done + guard (done == result) + def expect_success from p of job: expect_result from p of job result "done" +def expect_previous_success from p of job: + expect_previous_result from p of job result "done" + test RunWithoutRepo: node n @@ -61,12 +70,14 @@ test RunWithRepo: local: spawn on n as p args [ "./minici.yaml", "run", "--range=$c0..$c2" ] - expect_result from p: + expect_previous_result from p: of "$t1.success" result "done" of "$t1.failure" result "failed" + expect_result from p: of "$t1.third" result "done" of "$t1.fourth" result "done" + expect_previous_result from p: of "$t2.success" result "done" of "$t2.failure" result "failed" of "$t2.third" result "done" @@ -123,7 +134,7 @@ test RunExternalRepo: # Explicit jobfile within a git repo local: spawn on n as p args [ "--repo=first:./first", "--repo=second:./second", "--storage=.minici", "${scripts.path}/external.yaml", "run", "single" ] - expect_success from p of "single.$first_root" + expect_previous_success from p of "single.$first_root" expect /(.*)/ from p capture done guard (done == "run-finish") @@ -291,5 +302,6 @@ test RunExplicitDependentJob: expect_success from p of "$t4.fifth" flush from p matching /note .*/ + flush from p matching /job-duplicate .*/ expect /(.*)/ from p capture done guard (done == "run-finish") -- cgit v1.2.3