From bb780fa5637ddf346ad9e59e92755b4ca010a71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Wed, 4 Nov 2026 21:29:35 +0100 Subject: Accept revision expressions in job refs --- test/script/run.et | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'test') diff --git a/test/script/run.et b/test/script/run.et index 4df5a2e..4825108 100644 --- a/test/script/run.et +++ b/test/script/run.et @@ -860,3 +860,62 @@ test RestartCancelledJobs: /job-start $td:third/ /job-(.*)/ capture final_job guard (final_job == "finish $td:third done") + + +test RunHighestTag: + node n + shell on n as git_init: + git -c init.defaultBranch=master init -q + git -c user.name=test -c user.email=test commit -q --allow-empty -m 'initial commit' + cp "${scripts.path}/repo-basic2.yaml" minici.yaml + git add minici.yaml + git -c user.name=test -c user.email=test commit -q -m 'minici.yaml' + git rev-parse HEAD + + touch a + git add a + git -c user.name=test -c user.email=test commit -q -m a + git rev-parse HEAD + git rev-parse HEAD^{tree} + git -c user.name=test -c user.email=test tag -a -m ... v1.2 + + touch b + git add b + git -c user.name=test -c user.email=test commit -q -m b + git rev-parse HEAD + git rev-parse HEAD^{tree} + git -c user.name=test -c user.email=test tag -a -m ... v2.1 + + touch c + git add c + git -c user.name=test -c user.email=test commit -q -m c + git rev-parse HEAD + git rev-parse HEAD^{tree} + git -c user.name=test -c user.email=test tag -a -m ... v1.3 + git -c user.name=test -c user.email=test tag -a -m ... w1.3 + + git reset --hard HEAD~3 + git rev-parse HEAD + + expect /([0-9a-f]+)/ from git_init capture c_init + expect /([0-9a-f]+)/ from git_init capture ca + expect /([0-9a-f]+)/ from git_init capture ta + expect /([0-9a-f]+)/ from git_init capture cb + expect /([0-9a-f]+)/ from git_init capture tb + expect /([0-9a-f]+)/ from git_init capture cc + expect /([0-9a-f]+)/ from git_init capture tc + expect /([0-9a-f]+)/ from git_init capture c_end + + guard (c_init == c_end) + + local: + spawn on n as p args [ "run", "highesttag(v*):third", "highesttag(*):fourth" ] + expect from p: + /job-enqueue $tb:third/ + /job-start $tb:third/ + /job-finish $tb:third done/ + /job-enqueue $tc:fourth/ + /job-start $tc:fourth/ + /job-finish $tc:fourth done/ + expect /(.*)/ from p capture finish + guard (finish == "run-finish") -- cgit v1.2.3