[PATCH] By default, skip those kickstart tests we know to be failing.
Brian C. Lane
bcl at redhat.com
Wed Oct 14 20:52:24 UTC 2015
On Wed, Oct 14, 2015 at 02:13:18PM -0400, Chris Lumens wrote:
> This adds a new knownfailure test type. I've put it on both of the
> tests that always fail, and added +x back on the multilib test. The
> permission bit was always something I thought of as more of a local
> one-off way to disable a test anyway.
>
> Note you can still run the failing tests with "-t knownfailure", if you
> want to see if they are still failing. If you want to test just one,
> you can also pass it on the command line.
> ---
> tests/kickstart_tests/packages-instlangs-2.sh | 2 +-
> tests/kickstart_tests/packages-multilib.sh | 2 +-
> .../kickstart_tests/scripts/run_kickstart_tests.sh | 26 ++++++++++++++--------
> 3 files changed, 19 insertions(+), 11 deletions(-)
> mode change 100644 => 100755 tests/kickstart_tests/packages-multilib.sh
>
> diff --git a/tests/kickstart_tests/packages-instlangs-2.sh b/tests/kickstart_tests/packages-instlangs-2.sh
> index 39448bb..4737974 100755
> --- a/tests/kickstart_tests/packages-instlangs-2.sh
> +++ b/tests/kickstart_tests/packages-instlangs-2.sh
> @@ -17,6 +17,6 @@
> #
> # Red Hat Author(s): Chris Lumens <clumens at redhat.com>
>
> -TESTTYPE="packaging"
> +TESTTYPE="knownfailure packaging"
>
> . ${KSTESTDIR}/functions.sh
> diff --git a/tests/kickstart_tests/packages-multilib.sh b/tests/kickstart_tests/packages-multilib.sh
> old mode 100644
> new mode 100755
> index 39448bb..4737974
> --- a/tests/kickstart_tests/packages-multilib.sh
> +++ b/tests/kickstart_tests/packages-multilib.sh
> @@ -17,6 +17,6 @@
> #
> # Red Hat Author(s): Chris Lumens <clumens at redhat.com>
>
> -TESTTYPE="packaging"
> +TESTTYPE="knownfailure packaging"
>
> . ${KSTESTDIR}/functions.sh
> diff --git a/tests/kickstart_tests/scripts/run_kickstart_tests.sh b/tests/kickstart_tests/scripts/run_kickstart_tests.sh
> index 9664d6f..34610d8 100755
> --- a/tests/kickstart_tests/scripts/run_kickstart_tests.sh
> +++ b/tests/kickstart_tests/scripts/run_kickstart_tests.sh
> @@ -124,17 +124,25 @@ else
> tests=$(find kickstart_tests -maxdepth 1 -name '*sh' -a -perm -o+x)
>
> newtests=""
> - if [[ "$TESTTYPE" != "" ]]; then
> - for f in ${tests}; do
> - if [[ "$(grep "TESTTYPE=" ${f})" =~ "${TESTTYPE}" ]]; then
> - newtests+="${f} "
> - fi
> - done
> -
> - tests="${newtests}"
> - fi
> + for f in ${tests}; do
> + if [[ "$TESTTYPE" != "" && "$(grep TESTTYPE= ${f})" =~ "${TESTTYPE}" ]]; then
> + newtests+="${f} "
> + elif [[ "$TESTTYPE" == "" && ! "$(grep TESTTYPE= ${f})" =~ knownfailure ]]; then
> + # Skip any test with the type "knownfailure". If you want to run these (to
> + # see if they are still failing, for instance) you can add "-t knownfailure"
> + # on the command line.
> + newtests+="${f} "
> + else
> + continue
> + fi
> + done
> +
> + tests="${newtests}"
> fi
>
> +echo ${tests}
> +exit 0
> +
> if [[ "${tests}" == "" ]]; then
> echo "No tests provided; skipping."
> exit 77
> --
> 2.4.3
Ack
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list