-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override test metada from plan using
adjust-tests
(#2865)
New option for discover -h fmf to adjust discovered tests Fix: #2430 Co-authored-by: Petr Šplíchal <psplicha@redhat.com>
- Loading branch information
1 parent
b87eff8
commit 2f2c4b4
Showing
11 changed files
with
131 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
. /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
rlJournalStart | ||
rlPhaseStartSetup | ||
rlRun "pushd data" | ||
rlRun "run=\$(mktemp -d)" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest | ||
rlRun -s "tmt -c trigger=commit run -i $run discover plans --name /fmf/adjust-tests" | ||
# If we ever change the path... | ||
tests_yaml="$(find $run -name tests.yaml)" | ||
rlAssertExits "$tests_yaml" | ||
rlRun -s "yq '.[].require' < $tests_yaml" | ||
rlAssertGrep "foo" "$rlRun_LOG" | ||
rlRun -s "yq '.[].duration' < $tests_yaml" | ||
# 'duration_to_seconds' takes care of injection the default '5m' as the base | ||
rlAssertGrep "*2" "$rlRun_LOG" | ||
# check added | ||
rlRun -s "yq '.[].check' < $tests_yaml" | ||
rlAssertGrep "avc" $rlRun_LOG | ||
# recommend should not contain FAILURE | ||
rlRun -s "yq '.[].recommend' < $tests_yaml" | ||
rlAssertNotGrep "FAILURE" "$rlRun_LOG" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartCleanup | ||
rlRun "rm -rf $run" | ||
rlRun "popd" | ||
rlPhaseEnd | ||
rlJournalEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters