mirror of https://github.com/sbt/sbt.git
Merge pull request #3910 from cunei/wip-fix-fork-parallel
Allow the full tests/fork-parallel to pass on less than four cores
This commit is contained in:
commit
cbf7d92488
|
|
@ -13,6 +13,8 @@ lazy val root = (project in file(".")).
|
||||||
val log = streams.value.log
|
val log = streams.value.log
|
||||||
if( nbProc < 4 ) {
|
if( nbProc < 4 ) {
|
||||||
log.warn("With fewer than 4 processors this test is meaningless")
|
log.warn("With fewer than 4 processors this test is meaningless")
|
||||||
|
// mimic behavior expected by scripted
|
||||||
|
if (!testForkedParallel.value) sys.error("Exiting with error (note: test not performed)")
|
||||||
} else {
|
} else {
|
||||||
// we've got at least 4 processors, we'll check the upper end but also 3 and 4 as the upper might not
|
// we've got at least 4 processors, we'll check the upper end but also 3 and 4 as the upper might not
|
||||||
// be reached if the system is under heavy load.
|
// be reached if the system is under heavy load.
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,7 @@
|
||||||
# The tests/fork-parallel test will currently always
|
# Note: this test is meaningless on less than four cores
|
||||||
# report success when run on less than four cores,
|
|
||||||
# rather than failing in one of the two cases as expected.
|
|
||||||
# TODO: Adjust this scripted test so that it works as
|
|
||||||
# intended on less than four cores as well.
|
|
||||||
|
|
||||||
# To debug, it is possible to limit the number of cores
|
|
||||||
# reported to sbt, and run the test, by using:
|
|
||||||
# taskset 0x00000003 sbt 'scripted tests/fork-parallel'
|
|
||||||
# See: https://github.com/sbt/sbt/issues/3545
|
|
||||||
|
|
||||||
# This bit won't currently work when using less than four cores.
|
|
||||||
# > test
|
|
||||||
# -> check
|
|
||||||
|
|
||||||
|
> test
|
||||||
|
-> check
|
||||||
> clean
|
> clean
|
||||||
> set testForkedParallel := true
|
> set testForkedParallel := true
|
||||||
> test
|
> test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue