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:
Jason Evans 2017-05-22 17:15:57 -07:00
parent 9b1038d19c
commit 067b970130
3 changed files with 59 additions and 20 deletions

View File

@ -22,6 +22,8 @@ matrix:
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" 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 - os: osx
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: osx - os: osx
@ -46,6 +48,8 @@ matrix:
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
env: CC=clang CXX=clang++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" 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 - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
addons: addons:
@ -70,18 +74,32 @@ matrix:
apt: apt:
packages: packages:
- gcc-multilib - 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 - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" 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 - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds"
- os: linux - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" 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 - os: linux
env: CC=gcc CXX=g++ COMPILER_FLAGS="" CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" 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: before_script:

View File

@ -20,6 +20,10 @@ possible_config_opts = [
'--disable-stats', '--disable-stats',
'--with-malloc-conf=tcache:false', '--with-malloc-conf=tcache:false',
] ]
possible_malloc_conf_opts = [
'tcache:false',
'dss:primary',
]
print 'set -e' print 'set -e'
print 'autoconf' print 'autoconf'
@ -28,21 +32,26 @@ print 'unamestr=`uname`'
for cc, cxx in possible_compilers: for cc, cxx in possible_compilers:
for compiler_opts in powerset(possible_compiler_opts): for compiler_opts in powerset(possible_compiler_opts):
for config_opts in powerset(possible_config_opts): for config_opts in powerset(possible_config_opts):
if cc is 'clang' \ for malloc_conf_opts in powerset(possible_malloc_conf_opts):
and '-m32' in possible_compiler_opts \ if cc is 'clang' \
and '--enable-prof' in config_opts: and '-m32' in possible_compiler_opts \
continue and '--enable-prof' in config_opts:
config_line = ( continue
'EXTRA_CFLAGS=-Werror EXTRA_CXXFLAGS=-Werror ./configure ' config_line = (
+ 'CC="{} {}" '.format(cc, " ".join(compiler_opts)) 'EXTRA_CFLAGS=-Werror EXTRA_CXXFLAGS=-Werror ./configure '
+ 'CXX="{} {}" '.format(cxx, " ".join(compiler_opts)) + 'CC="{} {}" '.format(cc, " ".join(compiler_opts))
+ " ".join(config_opts) + 'CXX="{} {}" '.format(cxx, " ".join(compiler_opts))
) + " ".join(config_opts) + (' --with-malloc-conf=' +
# Heap profiling is not supported on OS X. ",".join(malloc_conf_opts) if len(malloc_conf_opts) > 0
if '--enable-prof' in config_opts: else '')
print 'if [[ "$unamestr" != "Darwin" ]]; then' )
print config_line # Heap profiling and dss are not supported on OS X.
print "make clean" darwin_unsupported = ('--enable-prof' in config_opts or \
print "make -j" + str(MAKE_J_VAL) + " check" 'dss:primary' in malloc_conf_opts)
if '--enable-prof' in config_opts: if darwin_unsupported:
print 'fi' print 'if [[ "$unamestr" != "Darwin" ]]; then'
print config_line
print "make clean"
print "make -j" + str(MAKE_J_VAL) + " check"
if darwin_unsupported:
print 'fi'

View File

@ -43,12 +43,16 @@ configure_flag_unusuals = [
'--enable-debug', '--enable-debug',
'--enable-prof', '--enable-prof',
'--disable-stats', '--disable-stats',
'--with-malloc-conf=tcache:false', ]
malloc_conf_unusuals = [
'tcache:false',
'dss:primary',
] ]
all_unusuals = ( all_unusuals = (
[os_unusual] + [compilers_unusual] + compiler_flag_unusuals [os_unusual] + [compilers_unusual] + compiler_flag_unusuals
+ configure_flag_unusuals + configure_flag_unusuals + malloc_conf_unusuals
) )
unusual_combinations_to_test = [] unusual_combinations_to_test = []
@ -71,6 +75,14 @@ for unusual_combination in unusual_combinations_to_test:
configure_flags = [ configure_flags = [
x for x in unusual_combination if x in configure_flag_unusuals] 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. # Filter out an unsupported configuration - heap profiling on OS X.
if os == 'osx' and '--enable-prof' in configure_flags: if os == 'osx' and '--enable-prof' in configure_flags:
continue continue