From 2368efedaca01d329deb372f7b9d48ba3c1841e4021ffe833058b984a33e86f2 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Thu, 16 Jun 2016 16:33:18 +0000 Subject: [PATCH] Accepting request 402682 from home:tsaupe:branches:devel:tools:building let parameter parsing of test-driver script match the help text OBS-URL: https://build.opensuse.org/request/show/402682 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/automake?expand=0&rev=52 --- ...ameter-parsing-in-test-driver-script.patch | 57 +++++++++++++++++++ automake-testsuite.spec | 4 +- automake.changes | 7 +++ automake.spec | 4 +- 4 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 0001-correct-parameter-parsing-in-test-driver-script.patch diff --git a/0001-correct-parameter-parsing-in-test-driver-script.patch b/0001-correct-parameter-parsing-in-test-driver-script.patch new file mode 100644 index 0000000..880fd28 --- /dev/null +++ b/0001-correct-parameter-parsing-in-test-driver-script.patch @@ -0,0 +1,57 @@ +From ba1172154da6739f9bf9e11c93f2abbb90a226ac Mon Sep 17 00:00:00 2001 +From: Thomas Blume +Date: Tue, 14 Jun 2016 14:45:42 +0200 +Subject: [PATCH] correct parameter parsing in test-driver script + +The help text suggest using an equal sign for assigning parameter values +but the code only supports spaces. +The patch adds support for both. +--- + lib/test-driver | 27 ++++++++++++++++----------- + 1 file changed, 16 insertions(+), 11 deletions(-) + +diff --git a/lib/test-driver b/lib/test-driver +index 8e575b0..69b47f8 100755 +--- a/lib/test-driver ++++ b/lib/test-driver +@@ -56,21 +56,26 @@ trs_file= # Where to save the metadata of the test run. + expect_failure=no + color_tests=no + enable_hard_errors=yes +-while test $# -gt 0; do +- case $1 in ++while test $# -gt 1; do ++ arg=${1%=*} ++ val=${1#*=} ++ if [ $arg == $val ]; then ++ val=$2 ++ shift ++ fi ++ case $arg in + --help) print_usage; exit $?;; + --version) echo "test-driver $scriptversion"; exit $?;; +- --test-name) test_name=$2; shift;; +- --log-file) log_file=$2; shift;; +- --trs-file) trs_file=$2; shift;; +- --color-tests) color_tests=$2; shift;; +- --expect-failure) expect_failure=$2; shift;; +- --enable-hard-errors) enable_hard_errors=$2; shift;; +- --) shift; break;; ++ --test-name) test_name=$val;; ++ --log-file) log_file=$val;; ++ --trs-file) trs_file=$val;; ++ --color-tests) color_tests=$val;; ++ --expect-failure) expect_failure=$val;; ++ --enable-hard-errors) enable_hard_errors=$val;; ++ --) break;; + -*) usage_error "invalid option: '$1'";; +- *) break;; + esac +- shift ++ [[ $arg != $val ]] && shift + done + + missing_opts= +-- +2.6.6 + diff --git a/automake-testsuite.spec b/automake-testsuite.spec index 1e2d11e..fe31cbf 100644 --- a/automake-testsuite.spec +++ b/automake-testsuite.spec @@ -1,7 +1,7 @@ # # spec file for package automake-testsuite # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -34,6 +34,7 @@ Source3: automake-rpmlintrc Patch2: automake-require_file.patch Patch3: automake-1.13.4-fix-primary-prefix-invalid-couples-test.patch Patch4: automake-perl-5.22.patch +Patch5: 0001-correct-parameter-parsing-in-test-driver-script.patch Patch100: automake-SuSE.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -64,6 +65,7 @@ definitions (with rules occasionally thrown in). The generated %patch2 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch100 %build diff --git a/automake.changes b/automake.changes index 89d1884..e6c952c 100644 --- a/automake.changes +++ b/automake.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 14 13:48:47 UTC 2016 - Thomas.Blume@suse.com + +- add 0001-correct-parameter-parsing-in-test-driver-script.patch + make parameter parsing of test driver script matching the help + text + ------------------------------------------------------------------- Tue Sep 1 12:12:46 UTC 2015 - dimstar@opensuse.org diff --git a/automake.spec b/automake.spec index f96e915..9fde984 100644 --- a/automake.spec +++ b/automake.spec @@ -1,7 +1,7 @@ # # spec file for package automake # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -34,6 +34,7 @@ Source3: automake-rpmlintrc Patch2: automake-require_file.patch Patch3: automake-1.13.4-fix-primary-prefix-invalid-couples-test.patch Patch4: automake-perl-5.22.patch +Patch5: 0001-correct-parameter-parsing-in-test-driver-script.patch Patch100: automake-SuSE.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -64,6 +65,7 @@ definitions (with rules occasionally thrown in). The generated %patch2 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch100 %build