Merge ~raharper/curtin:fix/jenkins-filter-once-more into curtin:master

Proposed by Ryan Harper
Status: Merged
Approved by: Scott Moser
Approved revision: 26660752f1f181a90faeb575a23637b743b985cc
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~raharper/curtin:fix/jenkins-filter-once-more
Merge into: curtin:master
Diff against target: 25 lines (+6/-6)
1 file modified
tools/jenkins-runner (+6/-6)
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+356597@code.launchpad.net

Commit message

jenkins-runner: fix when using --filter only

The elif clause when checking for tests via positional or filter
parameters never took the path where we invoked vmtest-filter.
Fix this by only pre-populating tests with 'tests/vmtests' if
there are no positional parameters and no filter parameters.

Also re-indent filter block to match program style.

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :

Running a test-job with proposed enabled using three filters

target_distro=ubuntu
target_release=bionic
conf_file=*basic.yaml

Which selects test_basic.py:BionicTestBasic and runs it with -proposed pocket enabled.

If this is successful, then we can update the -proposed jenkins jobs to use the
target_distro=ubuntu filter to ensure we only run Ubuntu proposed upgrades (ignoring Centos)
And vmtest currently already knows to not test -proposed on the devel release.

https://jenkins.ubuntu.com/server/job/curtin-vmtest-devel-debug/109/console

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

thanks.
For my feeble brain, I made the table below
http://paste.ubuntu.com/p/nXTNTksprF/

tests| ntfilters | result
 y | y | error
 n | n | use tests=( tests/vmtests )
 y | n | tests is set already, use "${tests[@]}"
 n | y | tests=$( $(vmtest-filter ...) )

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tools/jenkins-runner b/tools/jenkins-runner
2index c1cef8e..bf8ea0a 100755
3--- a/tools/jenkins-runner
4+++ b/tools/jenkins-runner
5@@ -79,14 +79,14 @@ if [ "${#tests[@]}" -ne 0 -a "${#ntfilters[@]}" -ne 0 ]; then
6 error "Passing test tests and --filter are incompatible."
7 error "test arguments provided were: ${#tests[*]}"
8 fail
9-elif [ "${#tests[@]}" -eq 0 ]; then
10+elif [ "${#tests[@]}" -eq 0 -a "${#ntfilters[@]}" -eq 0 ]; then
11 tests=( tests/vmtests )
12 elif [ "${#ntfilters[@]}" -ne 0 ]; then
13- tests=( $(./tools/vmtest-filter "${ntfilters[@]}") )
14- if [ "${#tests[@]}" -eq 0 ]; then
15- error "Failed to find any tests with filter(s): \"${ntfilters[*]}\""
16- fail "Try testing filters with: ./tools/vmtest-filter ${ntfilters[*]}"
17- fi
18+ tests=( $(./tools/vmtest-filter "${ntfilters[@]}") )
19+ if [ "${#tests[@]}" -eq 0 ]; then
20+ error "Failed to find any tests with filter(s): \"${ntfilters[*]}\""
21+ fail "Try testing filters with: ./tools/vmtest-filter ${ntfilters[*]}"
22+ fi
23 fi
24
25 CURTIN_VMTEST_PARALLEL=$parallel

Subscribers

People subscribed via source and target branches