forked from jemalloc/jemalloc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce scripts to run all possible tests
In 6e7d089 we added better travis continuous integration tests. This is nice, but has two problems: - We run only a subset of interesting tests. - The travis builds can take hours to give us back results (especially on OS X). This adds scripts/gen_run_tests.py, and its output, run_tests.sh, which builds and runs a larger portion of possible configurations on the local machine. While a travis run takes several hours to complete , I can run these scripts on my (OS X) latop and (Linux) devserve, and get a more exhaustive set of results back in around 10 minutes.
- Loading branch information
1 parent
6e7d089
commit 5260d9c
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$(dirname "$)")/scripts/gen_run_tests.py | bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python | ||
|
||
from itertools import combinations | ||
|
||
def powerset(items): | ||
result = [] | ||
for i in xrange(len(items) + 1): | ||
result += combinations(items, i) | ||
return result | ||
|
||
MAKE_J_VAL = 32 | ||
|
||
possible_compilers = [('gcc', 'g++'), ('clang', 'clang++')] | ||
possible_compiler_opts = [ | ||
'-m32', | ||
] | ||
possible_config_opts = [ | ||
'--enable-debug', | ||
'--enable-prof', | ||
'--disable-stats', | ||
'--disable-tcache', | ||
] | ||
|
||
print 'set -e' | ||
print 'autoconf' | ||
print 'unamestr=`uname`' | ||
|
||
for cc, cxx in possible_compilers: | ||
for compiler_opts in powerset(possible_compiler_opts): | ||
for config_opts in powerset(possible_config_opts): | ||
config_line = ( | ||
'./configure ' | ||
+ 'CC="{} {}" '.format(cc, " ".join(compiler_opts)) | ||
+ 'CXX="{} {}" '.format(cxx, " ".join(compiler_opts)) | ||
+ " ".join(config_opts) | ||
) | ||
# Heap profiling is not supported on OS X. | ||
if '--enable-prof' in config_opts: | ||
print 'if [[ "$unamestr" != "Darwin" ]]; then' | ||
print config_line | ||
print "make clean" | ||
print "make -j" + str(MAKE_J_VAL) + " check" | ||
if '--enable-prof' in config_opts: | ||
print 'fi' |