public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5803] contrib/regression/btest-gcc.sh: Handle multiple options.
@ 2023-11-23 23:21 Hans-Peter Nilsson
0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-11-23 23:21 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0ca1e90ae1a3b0ecb4ae90f9b785e618b295a3ff
commit r14-5803-g0ca1e90ae1a3b0ecb4ae90f9b785e618b295a3ff
Author: Hans-Peter Nilsson <hp@axis.com>
Date: Wed Nov 22 18:11:13 2023 +0100
contrib/regression/btest-gcc.sh: Handle multiple options.
This is a long-standing bug: passing "-j --add-passes-despite-regression"
or "--add-passes-despite-regression -j" caused the second option to be
treated as TARGET; the first non-option parameter.
* btest-gcc.sh (Option handling): Handle multiple options.
Diff:
---
contrib/regression/btest-gcc.sh | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh
index 1808fcc392f..22e8f039866 100755
--- a/contrib/regression/btest-gcc.sh
+++ b/contrib/regression/btest-gcc.sh
@@ -29,13 +29,16 @@ dashj=''
# -j<n>:
# Pass '-j<n>' to make.
-case "$1" in
- --add-passes-despite-regression)
- add_passes_despite_regression=1; shift;;
- -j*)
- dashj=$1; shift;;
- -*) echo "Invalid option: $1"; exit 2;;
-esac
+while : ; do
+ case "$1" in
+ --add-passes-despite-regression)
+ add_passes_despite_regression=1; shift;;
+ -j*)
+ dashj=$1; shift;;
+ -*) echo "Invalid option: $1"; exit 2;;
+ *) break;;
+ esac
+done
# TARGET is the target triplet. It should be the same one as used in
# constructing PREFIX. Or it can be the keyword 'native', indicating
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-23 23:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23 23:21 [gcc r14-5803] contrib/regression/btest-gcc.sh: Handle multiple options Hans-Peter Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).