summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-12-13 09:57:46 +0100
committerMichał Górny <mgorny@gentoo.org>2016-12-18 14:45:43 +0100
commit639d76a02d2965f426944f7fa6d0259a99a613f9 (patch)
tree965dd1e87e9e1c4a5682236de0045a1b47ec743e /eclass/tests
parentnet-misc/aria2: Bump to 1.30.0 (diff)
downloadgentoo-639d76a02d2965f426944f7fa6d0259a99a613f9.tar.gz
gentoo-639d76a02d2965f426944f7fa6d0259a99a613f9.tar.bz2
gentoo-639d76a02d2965f426944f7fa6d0259a99a613f9.zip
multiprocessing.eclass: Fix handling multiple short options (e.g. -kj)
Improve the regular expressions to handle parameters consisting of multiple short options (such as -kj). It should be noted that the code is not perfect but should handle all common (valid) cases; it could e.g. incorrectly process a short option followed by string arg such as '-Wfoo.j' although having this in MAKEOPTS is extremely unlikely.
Diffstat (limited to 'eclass/tests')
-rwxr-xr-xeclass/tests/multiprocessing_makeopts_jobs.sh3
-rwxr-xr-xeclass/tests/multiprocessing_makeopts_loadavg.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/eclass/tests/multiprocessing_makeopts_jobs.sh b/eclass/tests/multiprocessing_makeopts_jobs.sh
index 017d491156a0..a1e43c8b91d7 100755
--- a/eclass/tests/multiprocessing_makeopts_jobs.sh
+++ b/eclass/tests/multiprocessing_makeopts_jobs.sh
@@ -31,6 +31,9 @@ tests=(
7 "-l3 --jobs 7 -w"
4 "-j1 -j 2 --jobs 3 --jobs=4"
8 " -j 8 "
+ 999 "-kj"
+ 4 "-kj4"
+ 5 "-kj 5"
)
for (( i = 0; i < ${#tests[@]}; i += 2 )) ; do
test-makeopts_jobs "${tests[i]}" "${tests[i+1]}"
diff --git a/eclass/tests/multiprocessing_makeopts_loadavg.sh b/eclass/tests/multiprocessing_makeopts_loadavg.sh
index 12f9d01f9fcd..276b7e70d393 100755
--- a/eclass/tests/multiprocessing_makeopts_loadavg.sh
+++ b/eclass/tests/multiprocessing_makeopts_loadavg.sh
@@ -28,6 +28,9 @@ tests=(
4 "-j1 -j 2 --load-average 3 --load-average=4"
3 " --max-load=3 -x"
8 " -l 8 "
+ 999 "-kl"
+ 4 "-kl4"
+ 5 "-kl 5"
)
for (( i = 0; i < ${#tests[@]}; i += 2 )) ; do
test-makeopts_loadavg "${tests[i]}" "${tests[i+1]}"