From e4c73da9b59d0b558d96c31968cd0787622c2ef6 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 8 Sep 2011 22:00:30 +0000 Subject: [Author: aharper] Fix comparison for parallel tests and add logging so its clear which mode was selected. R=thomasvl APPROVED=thomasvl --- UnitTesting/RunMacOSUnitTests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UnitTesting/RunMacOSUnitTests.sh b/UnitTesting/RunMacOSUnitTests.sh index c5cafe4..14cb66c 100755 --- a/UnitTesting/RunMacOSUnitTests.sh +++ b/UnitTesting/RunMacOSUnitTests.sh @@ -81,12 +81,14 @@ GTMXcodeNote() { # Helper that works like the linux flock util, so you can run something, but # have only one run at a time. MaybeFlock() { - if [ $GTM_ONE_TEST_AT_A_TIME ]; then + if [ $GTM_ONE_TEST_AT_A_TIME -ne 0 ]; then + GTMXcodeNote ${LINENO} "Serializing test execution." python -c "import fcntl, subprocess, sys file = open('$TMPDIR/GTM_one_test_at_a_time', 'a') fcntl.flock(file.fileno(), fcntl.LOCK_EX) sys.exit(subprocess.call(sys.argv[1:]))" "${@}" else + GTMXcodeNote ${LINENO} "Allowing parallel test execution." "${@}" fi } -- cgit v1.2.3