summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2022-03-15 21:12:07 (GMT)
committerDaniel Moody <daniel.moody@mongodb.com>2022-03-15 21:12:07 (GMT)
commit0a1a6f14c8c954fa968b6d911fe1a3ad6d4881f8 (patch)
tree6251c7dded6513832c4f2f63dd9c4755d6ab7e50 /test
parent17c7e6a59b311b1f3b8c5daedc749f815b2f9d74 (diff)
downloadSCons-0a1a6f14c8c954fa968b6d911fe1a3ad6d4881f8.zip
SCons-0a1a6f14c8c954fa968b6d911fe1a3ad6d4881f8.tar.gz
SCons-0a1a6f14c8c954fa968b6d911fe1a3ad6d4881f8.tar.bz2
adjust iterative speedup to pre-launch scons daemon before taking timing
Diffstat (limited to 'test')
-rw-r--r--test/ninja/iterative_speedup.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ninja/iterative_speedup.py b/test/ninja/iterative_speedup.py
index 05e372c..e5673b0 100644
--- a/test/ninja/iterative_speedup.py
+++ b/test/ninja/iterative_speedup.py
@@ -109,7 +109,7 @@ def generate_source(parent_source, current_source):
test.write('source_{}.h'.format(current_source), """
#include <stdio.h>
#include <stdlib.h>
-
+
int
print_function%(current_source)s();
""" % locals())
@@ -125,7 +125,7 @@ def mod_source_return(test_num):
int
print_function%(test_num)s()
- {
+ {
int test = 5 + 5;
print_function%(parent_source)s();
return test;
@@ -143,7 +143,7 @@ def mod_source_orig(test_num):
int
print_function%(test_num)s()
- {
+ {
return print_function%(parent_source)s();
}
""" % locals())
@@ -190,13 +190,15 @@ jobs = '-j' + str(get_num_cpus())
ninja_program = [test.workpath('run_ninja_env.bat'), jobs] if IS_WINDOWS else [ninja_bin, jobs]
-start = time.perf_counter()
test.run(arguments='--disable-execute-ninja', stdout=None)
+test.run(program=ninja_program, arguments='run-ninja-scons-daemon', stdout=None)
+start = time.perf_counter()
test.run(program=ninja_program, stdout=None)
stop = time.perf_counter()
ninja_times += [stop - start]
test.run(program=test.workpath('print_bin'), stdout="main print")
+
for test_mod in tests_mods:
mod_source_return(test_mod)
start = time.perf_counter()