From b4eb7efe7d05845041a6a3cd1b8f7fb2de298041 Mon Sep 17 00:00:00 2001 From: mitzimorris Date: Mon, 29 Sep 2014 14:10:16 -0400 Subject: [PATCH 1/3] break tests into max 25 (hardcoded) --- runTests.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/runTests.py b/runTests.py index 4c1b029a32d..c2be02132e8 100755 --- a/runTests.py +++ b/runTests.py @@ -16,7 +16,7 @@ winsfx = ".exe" testsfx = "_test.cpp" -debug = False +debug = True def usage(): sys.stdout.write('usage: %s \n' % sys.argv[0]) @@ -72,10 +72,21 @@ def makeTests( dirname, filenames, j ): target = mungeName(target) targets.append(target) if (len(targets) > 0): - command = 'make -j%d %s' % (j,' '.join(targets)) if (debug): - print(command) - doCommand(command) + print('# targets: %d' % len(targets)) + startIdx = 0 + endIdx = 25 + while (startIdx < len(targets)): + print('start %d, end %d' % (startIdx,endIdx)) + command = 'make -j%d %s' % (j,' '.join(targets[startIdx:endIdx])) + if (debug): + print(command) + # doCommand(command) + startIdx = endIdx + endIdx = startIdx + 25 + if (endIdx > len(targets)): + endIdx = len(targets) + def runTest(name): executable = mungeName(name).replace("/",os.sep) From 65a9824421aa28f22a1b542c74eabe2b513313ee Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Mon, 29 Sep 2014 14:14:29 -0400 Subject: [PATCH 2/3] uncommented doCommand --- runTests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runTests.py b/runTests.py index c2be02132e8..74214399a99 100755 --- a/runTests.py +++ b/runTests.py @@ -81,7 +81,7 @@ def makeTests( dirname, filenames, j ): command = 'make -j%d %s' % (j,' '.join(targets[startIdx:endIdx])) if (debug): print(command) - # doCommand(command) + doCommand(command) startIdx = endIdx endIdx = startIdx + 25 if (endIdx > len(targets)): From eca5c6f3a84b6a6cff8f73172643e603556934e0 Mon Sep 17 00:00:00 2001 From: mitzimorris Date: Mon, 29 Sep 2014 14:56:36 -0400 Subject: [PATCH 3/3] moved debug prints to debug blocks, magic number batchSize --- runTests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/runTests.py b/runTests.py index 74214399a99..e80e1e25db4 100755 --- a/runTests.py +++ b/runTests.py @@ -16,7 +16,8 @@ winsfx = ".exe" testsfx = "_test.cpp" -debug = True +debug = False +batchSize = 25 def usage(): sys.stdout.write('usage: %s \n' % sys.argv[0]) @@ -75,15 +76,15 @@ def makeTests( dirname, filenames, j ): if (debug): print('# targets: %d' % len(targets)) startIdx = 0 - endIdx = 25 + endIdx = batchSize while (startIdx < len(targets)): - print('start %d, end %d' % (startIdx,endIdx)) command = 'make -j%d %s' % (j,' '.join(targets[startIdx:endIdx])) if (debug): + print('start %d, end %d' % (startIdx,endIdx)) print(command) doCommand(command) startIdx = endIdx - endIdx = startIdx + 25 + endIdx = startIdx + batchSize if (endIdx > len(targets)): endIdx = len(targets)