Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run plans in parallel #3265

Draft
wants to merge 2 commits into
base: poc-split-plan-by-max
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/run/max/data/.fmf/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
18 changes: 18 additions & 0 deletions tests/run/max/data/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/plan:
discover:
how: shell
tests:
- name: Test 1
test: echo "1"
- name: Test 2
test: echo "2"
- name: Test 3
test: echo "3"
- name: Test 4
test: echo "4"
- name: Test 5
test: echo "5"
provision:
how: local
execute:
how: tmt
1 change: 1 addition & 0 deletions tests/run/max/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
summary: Verify --max option splits plans into smaller plans
23 changes: 23 additions & 0 deletions tests/run/max/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1

rlJournalStart
rlPhaseStartSetup
rlRun "run=\$(mktemp -d)" 0 "Create run directory"
rlRun "pushd data"
rlPhaseEnd

rlPhaseStartTest
rlRun -s "tmt run -vv --id $run --max 3"
rlAssertGrep "Splitting plan to batches of 3 tests." $rlRun_LOG
rlAssertGrep "3 tests selected" $rlRun_LOG
rlAssertGrep "summary: 3 tests passed" $rlRun_LOG
rlAssertGrep "2 tests selected" $rlRun_LOG
rlAssertGrep "summary: 2 tests passed" $rlRun_LOG
rlPhaseEnd

rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $run" 0 "Remove run directory"
rlPhaseEnd
rlJournalEnd
Loading
Loading