Add dss:primary testing.
Generalize the run_tests.sh and .travis.yml test generation to handle combinations of arguments to the --with-malloc-conf configure option, and merge "dss:primary" into the existing "tcache:false" testing.
This commit is contained in:
parent
9b1038d19c
commit
067b970130
18
.travis.yml
18
.travis.yml
@ -22,6 +22,8 @@ matrix:
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: osx
|
||||
@ -46,6 +48,8 @@ matrix:
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
@ -70,18 +74,32 @@ matrix:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
- os: linux
|
||||
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
|
||||
|
||||
|
||||
before_script:
|
||||
|
@ -20,6 +20,10 @@ possible_config_opts = [
|
||||
'--disable-stats',
|
||||
'--with-malloc-conf=tcache:false',
|
||||
]
|
||||
possible_malloc_conf_opts = [
|
||||
'tcache:false',
|
||||
'dss:primary',
|
||||
]
|
||||
|
||||
print 'set -e'
|
||||
print 'autoconf'
|
||||
@ -28,21 +32,26 @@ 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):
|
||||
if cc is 'clang' \
|
||||
and '-m32' in possible_compiler_opts \
|
||||
and '--enable-prof' in config_opts:
|
||||
continue
|
||||
config_line = (
|
||||
'EXTRA_CFLAGS=-Werror EXTRA_CXXFLAGS=-Werror ./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'
|
||||
for malloc_conf_opts in powerset(possible_malloc_conf_opts):
|
||||
if cc is 'clang' \
|
||||
and '-m32' in possible_compiler_opts \
|
||||
and '--enable-prof' in config_opts:
|
||||
continue
|
||||
config_line = (
|
||||
'EXTRA_CFLAGS=-Werror EXTRA_CXXFLAGS=-Werror ./configure '
|
||||
+ 'CC="{} {}" '.format(cc, " ".join(compiler_opts))
|
||||
+ 'CXX="{} {}" '.format(cxx, " ".join(compiler_opts))
|
||||
+ " ".join(config_opts) + (' --with-malloc-conf=' +
|
||||
",".join(malloc_conf_opts) if len(malloc_conf_opts) > 0
|
||||
else '')
|
||||
)
|
||||
# Heap profiling and dss are not supported on OS X.
|
||||
darwin_unsupported = ('--enable-prof' in config_opts or \
|
||||
'dss:primary' in malloc_conf_opts)
|
||||
if darwin_unsupported:
|
||||
print 'if [[ "$unamestr" != "Darwin" ]]; then'
|
||||
print config_line
|
||||
print "make clean"
|
||||
print "make -j" + str(MAKE_J_VAL) + " check"
|
||||
if darwin_unsupported:
|
||||
print 'fi'
|
||||
|
@ -43,12 +43,16 @@ configure_flag_unusuals = [
|
||||
'--enable-debug',
|
||||
'--enable-prof',
|
||||
'--disable-stats',
|
||||
'--with-malloc-conf=tcache:false',
|
||||
]
|
||||
|
||||
malloc_conf_unusuals = [
|
||||
'tcache:false',
|
||||
'dss:primary',
|
||||
]
|
||||
|
||||
all_unusuals = (
|
||||
[os_unusual] + [compilers_unusual] + compiler_flag_unusuals
|
||||
+ configure_flag_unusuals
|
||||
+ configure_flag_unusuals + malloc_conf_unusuals
|
||||
)
|
||||
|
||||
unusual_combinations_to_test = []
|
||||
@ -71,6 +75,14 @@ for unusual_combination in unusual_combinations_to_test:
|
||||
configure_flags = [
|
||||
x for x in unusual_combination if x in configure_flag_unusuals]
|
||||
|
||||
malloc_conf = [
|
||||
x for x in unusual_combination if x in malloc_conf_unusuals]
|
||||
# Filter out an unsupported configuration - dss on OS X.
|
||||
if os == 'osx' and 'dss:primary' in malloc_conf:
|
||||
continue
|
||||
if len(malloc_conf) > 0:
|
||||
configure_flags.append('--with-malloc-conf=' + ",".join(malloc_conf))
|
||||
|
||||
# Filter out an unsupported configuration - heap profiling on OS X.
|
||||
if os == 'osx' and '--enable-prof' in configure_flags:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user