diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-05-11 14:22:01 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-05-11 14:22:01 +0000 |
commit | 27869b49ed7d96f6e5810ef31befc1b3c9f7a0a5 (patch) | |
tree | 40bb8e95b952805099a0a65f9f3a6c4feaf1fe53 /eclass/tests | |
parent | Revert homepage (it is back to original now) (diff) | |
download | historical-27869b49ed7d96f6e5810ef31befc1b3c9f7a0a5.tar.gz historical-27869b49ed7d96f6e5810ef31befc1b3c9f7a0a5.tar.bz2 historical-27869b49ed7d96f6e5810ef31befc1b3c9f7a0a5.zip |
support extended makeflag syntax and not just -j#
Diffstat (limited to 'eclass/tests')
-rwxr-xr-x | eclass/tests/eutils:makeopts_jobs.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/eclass/tests/eutils:makeopts_jobs.sh b/eclass/tests/eutils:makeopts_jobs.sh new file mode 100755 index 000000000000..bd9f696cc91a --- /dev/null +++ b/eclass/tests/eutils:makeopts_jobs.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +source tests-common.sh + +inherit eutils + +test-makeopts_jobs() { + local exp=$1; shift + tbegin "makeopts_jobs($*) == ${exp}" + local act=$(makeopts_jobs "$@") + [[ ${act} == "${exp}" ]] + tend $? "Got back: ${act}" +} + +tests=( + 999 "-j" + 999 "--jobs" + 1 "" + 1 "-l9 -w" + 1 "-l9 -w-j4" + 1 "-l9--jobs=3" + 1 "-l9--jobs=8" + 2 "-j2" + 3 "-j 3" + 4 "-l3 -j 4 -w" + 5 "--jobs=5" + 6 "--jobs 6" + 7 "-l3 --jobs 7 -w" + 4 "-j1 -j 2 --jobs 3 --jobs=4" + 8 " -j 8 " +) +for (( i = 0; i < ${#tests[@]}; i += 2 )) ; do + test-makeopts_jobs "${tests[i]}" "${tests[i+1]}" +done + +texit |