diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-06-07 05:00:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-06-07 05:00:23 +0000 |
commit | a2dc1fb96df786a71c36d0ad2ded25bbef0f63aa (patch) | |
tree | 2f5d59174ded11a89f79e2cf19e2afc63a9ec2e0 /eclass | |
parent | initial multiprocessing eclass (diff) | |
download | gentoo-2-a2dc1fb96df786a71c36d0ad2ded25bbef0f63aa.tar.gz gentoo-2-a2dc1fb96df786a71c36d0ad2ded25bbef0f63aa.tar.bz2 gentoo-2-a2dc1fb96df786a71c36d0ad2ded25bbef0f63aa.zip |
add tests for new multiprocessing eclass
Diffstat (limited to 'eclass')
-rwxr-xr-x | eclass/tests/multiprocessing.sh | 40 | ||||
-rwxr-xr-x | eclass/tests/multiprocessing:makeopts_jobs.sh (renamed from eclass/tests/eutils:makeopts_jobs.sh) | 2 |
2 files changed, 41 insertions, 1 deletions
diff --git a/eclass/tests/multiprocessing.sh b/eclass/tests/multiprocessing.sh new file mode 100755 index 000000000000..bfbf30eb500b --- /dev/null +++ b/eclass/tests/multiprocessing.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +source tests-common.sh + +inherit multiprocessing + +tbegin "simple" +MAKEOPTS="-j1" multijob_init +multijob_child_init ls -d / >/dev/null || die "fail!" +multijob_finish +tend $? + +tbegin "less simple" +multijob_init -j3 +multijob_child_init true || die "fail!" +multijob_child_init false || die "fail!" +multijob_child_init true || die "fail!" +multijob_finish +tend $(( $? == 1 ? 0 : 1 )) + +tbegin "less less simple" +multijob_init -j1 +multijob_child_init true || die "fail!" +multijob_child_init false || die "fail!" +multijob_child_init true && die "fail!" +multijob_finish +tend $? + +tbegin "less less less simple" +multijob_init -j10 +multijob_child_init true || die "fail!" +multijob_finish_one || die "fail!" +multijob_child_init false || die "fail!" +multijob_finish_one && die "fail!" +multijob_child_init true || die "fail!" +multijob_finish_one || die "fail!" +multijob_finish +tend $? + +texit diff --git a/eclass/tests/eutils:makeopts_jobs.sh b/eclass/tests/multiprocessing:makeopts_jobs.sh index bd9f696cc91a..4641e08b5143 100755 --- a/eclass/tests/eutils:makeopts_jobs.sh +++ b/eclass/tests/multiprocessing:makeopts_jobs.sh @@ -2,7 +2,7 @@ source tests-common.sh -inherit eutils +inherit multiprocessing test-makeopts_jobs() { local exp=$1; shift |