reverted conditional phases support
This commit is contained in:
parent
e1b6086b0d
commit
973099d0c0
113
0001-reverting-conditional-phases-support-except-for-comm.patch
Normal file
113
0001-reverting-conditional-phases-support-except-for-comm.patch
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
From 4284be292d6a409f83952702e0a4f0f8cdd8d637 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dalibor Pospisil <dapospis@redhat.com>
|
||||||
|
Date: Thu, 17 Jul 2014 13:07:10 +0200
|
||||||
|
Subject: [PATCH] reverting conditional phases support, except for common
|
||||||
|
handling of phase start
|
||||||
|
|
||||||
|
---
|
||||||
|
src/logging.sh | 64 ----------------------------------------------------------
|
||||||
|
1 file changed, 64 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/logging.sh b/src/logging.sh
|
||||||
|
index d831ac8..b01b102 100644
|
||||||
|
--- a/src/logging.sh
|
||||||
|
+++ b/src/logging.sh
|
||||||
|
@@ -756,21 +756,6 @@ rlShowRunningKernel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-__INTERNAL_conditional_phase_eval() {
|
||||||
|
- # check phases black-list
|
||||||
|
- [[ -n "$PHASES_BL" && "$1" =~ $PHASES_BL ]] && {
|
||||||
|
- rlLogWarning "Phase '$1' should be skipped as it is defined in \$PHASES_BL='$PHASES_BL'"
|
||||||
|
- return 2
|
||||||
|
- }
|
||||||
|
- # always execute Setup, Cleanup and if no PHASES (white-list) specified
|
||||||
|
- [[ "$1" == "Setup" || "$1" == "Cleanup" || -z "$PHASES" ]] && return 0
|
||||||
|
- [[ "$1" =~ $PHASES ]] && return 0 || {
|
||||||
|
- rlLogWarning "Phase '$1' should be skipped as it is not defined in \$PHASES='$PHASES'"
|
||||||
|
- return 1
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
# rlPhaseStart
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@@ -813,14 +798,10 @@ Optional name of the phase (if not provided, one will be generated).
|
||||||
|
|
||||||
|
If all asserts included in the phase pass, phase reports PASS.
|
||||||
|
|
||||||
|
-Returns non-zero if something went wrong or if the phase is not supposed to be
|
||||||
|
-executed (refer to B<Conditional phases> section) otherwise retun 0.
|
||||||
|
-
|
||||||
|
=cut
|
||||||
|
|
||||||
|
rlPhaseStart() {
|
||||||
|
if [ "x$1" = "xFAIL" -o "x$1" = "xWARN" ] ; then
|
||||||
|
- __INTERNAL_conditional_phase_eval "$2" && \
|
||||||
|
rljAddPhase "$1" "$2"
|
||||||
|
return $?
|
||||||
|
else
|
||||||
|
@@ -878,9 +859,6 @@ used.
|
||||||
|
|
||||||
|
If you do not want these shortcuts, use plain C<rlPhaseStart> function.
|
||||||
|
|
||||||
|
-Returns non-zero if something went wrong or if the phase is not supposed to be
|
||||||
|
-executed (refer to B<Conditional phases> section) otherwise retun 0.
|
||||||
|
-
|
||||||
|
=cut
|
||||||
|
|
||||||
|
rlPhaseStartSetup() {
|
||||||
|
@@ -893,48 +871,6 @@ rlPhaseStartCleanup() {
|
||||||
|
rlPhaseStart "WARN" "${1:-Cleanup}"
|
||||||
|
}
|
||||||
|
|
||||||
|
-: <<'=cut'
|
||||||
|
-=pod
|
||||||
|
-
|
||||||
|
-=head2 Conditional phases
|
||||||
|
-
|
||||||
|
-Each test phase can be conditionally skipped based on bash regular expression
|
||||||
|
-given in PHASES_BL and/or PHASES variables.
|
||||||
|
-
|
||||||
|
-=over
|
||||||
|
-
|
||||||
|
-=item PHASES_BL
|
||||||
|
-
|
||||||
|
-If match the phase name the respective phase should be skipped.
|
||||||
|
-
|
||||||
|
-=item PHASES
|
||||||
|
-
|
||||||
|
-If does B<not> match the phase name the respective phase should be skipped
|
||||||
|
-excluding 'Setup' and 'Cleanup' phases.
|
||||||
|
-
|
||||||
|
-=back
|
||||||
|
-
|
||||||
|
-Actual skipping has to be done in the test case itself by using return code of
|
||||||
|
-functions I<rlPhaseStart>, I<rlPhaseStartSetup>, I<rlPhaseStartTest> and
|
||||||
|
-I<rlPhaseStartCleanup>.
|
||||||
|
-
|
||||||
|
-Example:
|
||||||
|
-
|
||||||
|
- rlPhaseStartTest "bz123456" && {
|
||||||
|
- ...
|
||||||
|
- rlPhaseEnd; }
|
||||||
|
-
|
||||||
|
-Evaluation of the phase relevancy works as follows:
|
||||||
|
- 1. If PHASES_BL is non-empty and matches phase name => return 2.
|
||||||
|
- 2. If phase name is 'Setup' or 'Cleanup' or PHASES is empty => return 0.
|
||||||
|
- 3. If PHASES is non-empty and matches phase name => return 0 otherwise return 1.
|
||||||
|
-
|
||||||
|
-Normaly Setup and Cleanup phases are not skipped unless hey are B<explicitly>
|
||||||
|
-black-listed.
|
||||||
|
-
|
||||||
|
-=cut
|
||||||
|
-
|
||||||
|
-
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
# rlLogLowMetric
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Name: beakerlib
|
Name: beakerlib
|
||||||
Summary: A shell-level integration testing library
|
Summary: A shell-level integration testing library
|
||||||
Version: 1.9
|
Version: 1.9
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
@ -28,6 +28,7 @@ Patch10: 0011-log-rpm-package-also-in-non-asserted-rpm-checks.patch
|
|||||||
Patch11: 0012-rlCheckRequirements-completely-supress-output-of-rlC.patch
|
Patch11: 0012-rlCheckRequirements-completely-supress-output-of-rlC.patch
|
||||||
Patch12: 0013-add-srpm-info-to-journal-bz1071693.patch
|
Patch12: 0013-add-srpm-info-to-journal-bz1071693.patch
|
||||||
Patch13: 0014-supress-storage-data-in-non-debug-mode.patch
|
Patch13: 0014-supress-storage-data-in-non-debug-mode.patch
|
||||||
|
Patch14: 0001-reverting-conditional-phases-support-except-for-comm.patch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -61,6 +62,7 @@ Files for syntax highlighting BeakerLib tests in VIM editor
|
|||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
|
%patch14 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make build
|
make build
|
||||||
@ -101,6 +103,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/vim/vimfiles/after/syntax/beakerlib.vim
|
%{_datadir}/vim/vimfiles/after/syntax/beakerlib.vim
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 1 2014 Dalibor Pospisil <dapospis@redhat.com> - 1.9-3
|
||||||
|
- reverted conditional phases support
|
||||||
|
|
||||||
* Tue Jul 1 2014 Dalibor Pospisil <dapospis@redhat.com> - 1.9-2
|
* Tue Jul 1 2014 Dalibor Pospisil <dapospis@redhat.com> - 1.9-2
|
||||||
- bunch of fixes
|
- bunch of fixes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user