diff options
author | Danny Lin <danny@kdrag0n.dev> | 2021-10-11 20:49:26 -0700 |
---|---|---|
committer | alk3pInjection <5e147612@kscope.ink> | 2022-05-08 12:40:50 +0800 |
commit | e36e52fb6ec54bc47e17e849ca5a3a301eaa6d05 (patch) | |
tree | 854d309be91bcdd38fe46ea8ad0f906bef39d017 /scripts/gen_run_tests.py | |
parent | 6d4d27fd2651ed114386b89c2d251b816a849460 (diff) | |
parent | ea6b3e973b477b8061e0076bb257dbd7f3faa756 (diff) |
Merge tag '5.2.1' into HEAD
Release
Change-Id: I269b861cb81499b78f13dc2e88827f13ef5a207d
Diffstat (limited to 'scripts/gen_run_tests.py')
-rwxr-xr-x | scripts/gen_run_tests.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/scripts/gen_run_tests.py b/scripts/gen_run_tests.py index a87ecffb..a414f812 100755 --- a/scripts/gen_run_tests.py +++ b/scripts/gen_run_tests.py @@ -4,6 +4,7 @@ import sys from itertools import combinations from os import uname from multiprocessing import cpu_count +from subprocess import call # Later, we want to test extended vaddr support. Apparently, the "real" way of # checking this is flaky on OS X. @@ -13,13 +14,25 @@ nparallel = cpu_count() * 2 uname = uname()[0] +if "BSD" in uname: + make_cmd = 'gmake' +else: + make_cmd = 'make' + def powerset(items): result = [] for i in xrange(len(items) + 1): result += combinations(items, i) return result -possible_compilers = [('gcc', 'g++'), ('clang', 'clang++')] +possible_compilers = [] +for cc, cxx in (['gcc', 'g++'], ['clang', 'clang++']): + try: + cmd_ret = call([cc, "-v"]) + if cmd_ret == 0: + possible_compilers.append((cc, cxx)) + except: + pass possible_compiler_opts = [ '-m32', ] @@ -27,6 +40,7 @@ possible_config_opts = [ '--enable-debug', '--enable-prof', '--disable-stats', + '--enable-opt-safety-checks', ] if bits_64: possible_config_opts.append('--with-lg-vaddr=56') @@ -39,7 +53,7 @@ possible_malloc_conf_opts = [ ] print 'set -e' -print 'if [ -f Makefile ] ; then make relclean ; fi' +print 'if [ -f Makefile ] ; then %(make_cmd)s relclean ; fi' % {'make_cmd': make_cmd} print 'autoconf' print 'rm -rf run_tests.out' print 'mkdir run_tests.out' @@ -102,11 +116,11 @@ cd run_test_%(ind)d.out echo "==> %(config_line)s" >> run_test.log %(config_line)s >> run_test.log 2>&1 || abort -run_cmd make all tests -run_cmd make check -run_cmd make distclean +run_cmd %(make_cmd)s all tests +run_cmd %(make_cmd)s check +run_cmd %(make_cmd)s distclean EOF -chmod 755 run_test_%(ind)d.sh""" % {'ind': ind, 'config_line': config_line} +chmod 755 run_test_%(ind)d.sh""" % {'ind': ind, 'config_line': config_line, 'make_cmd': make_cmd} ind += 1 print 'for i in `seq 0 %(last_ind)d` ; do echo run_test_${i}.sh ; done | xargs -P %(nparallel)d -n 1 sh' % {'last_ind': ind-1, 'nparallel': nparallel} |