diff options
author | Ulrich Müller <ulm@gentoo.org> | 2015-05-09 08:01:28 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2015-05-09 08:01:28 +0000 |
commit | f2a5d663961c797d88e843e761f7fc2699bb97ed (patch) | |
tree | 2f4a67c0351d6d463a1598b6e5710ae7657d5a53 /eclass/tests/multiprocessing_makeopts_jobs.sh | |
parent | Version bump. (diff) | |
download | gentoo-2-f2a5d663961c797d88e843e761f7fc2699bb97ed.tar.gz gentoo-2-f2a5d663961c797d88e843e761f7fc2699bb97ed.tar.bz2 gentoo-2-f2a5d663961c797d88e843e761f7fc2699bb97ed.zip |
Avoid problematic colon char in filenames, bug 548750.
Diffstat (limited to 'eclass/tests/multiprocessing_makeopts_jobs.sh')
-rwxr-xr-x | eclass/tests/multiprocessing_makeopts_jobs.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/eclass/tests/multiprocessing_makeopts_jobs.sh b/eclass/tests/multiprocessing_makeopts_jobs.sh new file mode 100755 index 000000000000..4641e08b5143 --- /dev/null +++ b/eclass/tests/multiprocessing_makeopts_jobs.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +source tests-common.sh + +inherit multiprocessing + +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 |