Changes in / [14b253d:636e1b9]
- Files:
-
- 11 edited
-
Jenkinsfile (modified) (1 diff)
-
automake/cfa.m4 (modified) (2 diffs)
-
configure (modified) (5 diffs)
-
configure.ac (modified) (1 diff)
-
libcfa/configure (modified) (4 diffs)
-
tests/Makefile.am (modified) (1 diff)
-
tests/Makefile.in (modified) (1 diff)
-
tests/config.py.in (modified) (1 diff)
-
tests/pybin/settings.py (modified) (5 diffs)
-
tests/pybin/tools.py (modified) (2 diffs)
-
tests/test.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r14b253d r636e1b9 128 128 description: 'If true, jenkins also runs benchmarks', \ 129 129 name: 'pRunBenchmark', \ 130 defaultValue: false, \130 defaultValue: true, \ 131 131 ], \ 132 132 [$class: 'BooleanParameterDefinition', \ -
automake/cfa.m4
r14b253d r636e1b9 6 6 cfa_prefix=${prefix} 7 7 fi 8 cfa_prefix="$(readlink - m${cfa_prefix})/"8 cfa_prefix="$(readlink -f ${cfa_prefix})/" 9 9 AC_DEFINE_UNQUOTED(CFA_PREFIX, "${cfa_prefix}", [Location of cfa install.]) 10 10 AC_SUBST(CFA_PREFIX, ${cfa_prefix}) 11 11 12 12 if test "$includedir" = '${prefix}/include'; then 13 cfa_incdir="${cfa_prefix} include/${cfa_name}"13 cfa_incdir="${cfa_prefix}/include/${cfa_name}" 14 14 else 15 15 cfa_incdir=${includedir} 16 16 fi 17 cfa_incdir="$(readlink - m${cfa_incdir})/"17 cfa_incdir="$(readlink -f ${cfa_incdir})/" 18 18 AC_DEFINE_UNQUOTED(CFA_INCDIR, "${cfa_incdir}", [Location of include files.]) 19 19 AC_SUBST(CFA_INCDIR, ${cfa_incdir}) 20 20 21 21 if test "$bindir" = '${exec_prefix}/bin'; then 22 cfa_bindir="${cfa_prefix} bin"22 cfa_bindir="${cfa_prefix}/bin" 23 23 else 24 24 cfa_bindir=${bindir} 25 25 fi 26 cfa_bindir="$(readlink - m${cfa_bindir})/"26 cfa_bindir="$(readlink -f ${cfa_bindir})/" 27 27 AC_DEFINE_UNQUOTED(CFA_BINDIR, "${cfa_bindir}", [Location of cfa command.]) 28 28 AC_SUBST(CFA_BINDIR, ${cfa_bindir}) … … 30 30 if test "$libdir" = '${exec_prefix}/lib'; then 31 31 if test "${ARCHITECTURE}" != ""; then 32 cfa_libdir="${cfa_prefix} lib/${cfa_name}/${ARCHITECTURE}-${CONFIGURATION}/"32 cfa_libdir="${cfa_prefix}/lib/${cfa_name}/${ARCHITECTURE}-${CONFIGURATION}/" 33 33 else 34 cfa_libdir="${cfa_prefix} lib/${cfa_name}/"34 cfa_libdir="${cfa_prefix}/lib/${cfa_name}/" 35 35 fi 36 36 else 37 37 cfa_libdir="${libdir}/${ARCHITECTURE}${CONFIGURATION}" 38 38 fi 39 cfa_libdir="$(readlink - m${cfa_libdir})/"39 cfa_libdir="$(readlink -f ${cfa_libdir})/" 40 40 AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.]) 41 41 AC_SUBST(CFA_LIBDIR, ${cfa_libdir}) -
configure
r14b253d r636e1b9 3235 3235 cfa_prefix=${prefix} 3236 3236 fi 3237 cfa_prefix="$(readlink - m${cfa_prefix})/"3237 cfa_prefix="$(readlink -f ${cfa_prefix})/" 3238 3238 3239 3239 cat >>confdefs.h <<_ACEOF … … 3245 3245 3246 3246 if test "$includedir" = '${prefix}/include'; then 3247 cfa_incdir="${cfa_prefix} include/${cfa_name}"3247 cfa_incdir="${cfa_prefix}/include/${cfa_name}" 3248 3248 else 3249 3249 cfa_incdir=${includedir} 3250 3250 fi 3251 cfa_incdir="$(readlink - m${cfa_incdir})/"3251 cfa_incdir="$(readlink -f ${cfa_incdir})/" 3252 3252 3253 3253 cat >>confdefs.h <<_ACEOF … … 3259 3259 3260 3260 if test "$bindir" = '${exec_prefix}/bin'; then 3261 cfa_bindir="${cfa_prefix} bin"3261 cfa_bindir="${cfa_prefix}/bin" 3262 3262 else 3263 3263 cfa_bindir=${bindir} 3264 3264 fi 3265 cfa_bindir="$(readlink - m${cfa_bindir})/"3265 cfa_bindir="$(readlink -f ${cfa_bindir})/" 3266 3266 3267 3267 cat >>confdefs.h <<_ACEOF … … 3274 3274 if test "$libdir" = '${exec_prefix}/lib'; then 3275 3275 if test "${ARCHITECTURE}" != ""; then 3276 cfa_libdir="${cfa_prefix} lib/${cfa_name}/${ARCHITECTURE}-${CONFIGURATION}/"3276 cfa_libdir="${cfa_prefix}/lib/${cfa_name}/${ARCHITECTURE}-${CONFIGURATION}/" 3277 3277 else 3278 cfa_libdir="${cfa_prefix} lib/${cfa_name}/"3278 cfa_libdir="${cfa_prefix}/lib/${cfa_name}/" 3279 3279 fi 3280 3280 else 3281 3281 cfa_libdir="${libdir}/${ARCHITECTURE}${CONFIGURATION}" 3282 3282 fi 3283 cfa_libdir="$(readlink - m${cfa_libdir})/"3283 cfa_libdir="$(readlink -f ${cfa_libdir})/" 3284 3284 3285 3285 cat >>confdefs.h <<_ACEOF … … 3294 3294 # Create variables for commonly used targets 3295 3295 3296 TOP_SRCDIR="$(readlink - m$ac_confdir/)/"3297 TOP_BUILDDIR="$(readlink - m$ac_pwd/)/"3296 TOP_SRCDIR="$(readlink -f $ac_confdir/)/" 3297 TOP_BUILDDIR="$(readlink -f $ac_pwd/)/" 3298 3298 3299 3299 -
configure.ac
r14b253d r636e1b9 80 80 # Create variables for commonly used targets 81 81 82 TOP_SRCDIR="$(readlink - m$ac_confdir/)/"83 TOP_BUILDDIR="$(readlink - m$ac_pwd/)/"82 TOP_SRCDIR="$(readlink -f $ac_confdir/)/" 83 TOP_BUILDDIR="$(readlink -f $ac_pwd/)/" 84 84 85 85 AC_DEFINE_UNQUOTED(TOP_SRCDIR, "$TOP_SRCDIR", [Top src directory]) -
libcfa/configure
r14b253d r636e1b9 2574 2574 cfa_prefix=${prefix} 2575 2575 fi 2576 cfa_prefix="$(readlink - m${cfa_prefix})/"2576 cfa_prefix="$(readlink -f ${cfa_prefix})/" 2577 2577 2578 2578 cat >>confdefs.h <<_ACEOF … … 2584 2584 2585 2585 if test "$includedir" = '${prefix}/include'; then 2586 cfa_incdir="${cfa_prefix} include/${cfa_name}"2586 cfa_incdir="${cfa_prefix}/include/${cfa_name}" 2587 2587 else 2588 2588 cfa_incdir=${includedir} 2589 2589 fi 2590 cfa_incdir="$(readlink - m${cfa_incdir})/"2590 cfa_incdir="$(readlink -f ${cfa_incdir})/" 2591 2591 2592 2592 cat >>confdefs.h <<_ACEOF … … 2598 2598 2599 2599 if test "$bindir" = '${exec_prefix}/bin'; then 2600 cfa_bindir="${cfa_prefix} bin"2600 cfa_bindir="${cfa_prefix}/bin" 2601 2601 else 2602 2602 cfa_bindir=${bindir} 2603 2603 fi 2604 cfa_bindir="$(readlink - m${cfa_bindir})/"2604 cfa_bindir="$(readlink -f ${cfa_bindir})/" 2605 2605 2606 2606 cat >>confdefs.h <<_ACEOF … … 2613 2613 if test "$libdir" = '${exec_prefix}/lib'; then 2614 2614 if test "${ARCHITECTURE}" != ""; then 2615 cfa_libdir="${cfa_prefix} lib/${cfa_name}/${ARCHITECTURE}-${CONFIGURATION}/"2615 cfa_libdir="${cfa_prefix}/lib/${cfa_name}/${ARCHITECTURE}-${CONFIGURATION}/" 2616 2616 else 2617 cfa_libdir="${cfa_prefix} lib/${cfa_name}/"2617 cfa_libdir="${cfa_prefix}/lib/${cfa_name}/" 2618 2618 fi 2619 2619 else 2620 2620 cfa_libdir="${libdir}/${ARCHITECTURE}${CONFIGURATION}" 2621 2621 fi 2622 cfa_libdir="$(readlink - m${cfa_libdir})/"2622 cfa_libdir="$(readlink -f ${cfa_libdir})/" 2623 2623 2624 2624 cat >>confdefs.h <<_ACEOF -
tests/Makefile.am
r14b253d r636e1b9 24 24 concurrent= 25 25 26 TEST_PY = python ${ builddir}/test.py26 TEST_PY = python ${srcdir}/test.py 27 27 28 28 # applies to both programs -
tests/Makefile.in
r14b253d r636e1b9 301 301 quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes 302 302 concurrent = 303 TEST_PY = python ${ builddir}/test.py303 TEST_PY = python ${srcdir}/test.py 304 304 305 305 # applies to both programs -
tests/config.py.in
r14b253d r636e1b9 5 5 """ 6 6 7 SRCDIR = "@ abs_srcdir@"8 BUILDDIR = "@ abs_builddir@"7 SRCDIR = "@srcdir@" 8 BUILDDIR = "@builddir@" 9 9 HOSTARCH = "@host_cpu@" -
tests/pybin/settings.py
r14b253d r636e1b9 6 6 7 7 try : 8 testpath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), sys.argv[0]))) 9 sys.path.append(testpath) 8 sys.path.append(os.getcwd()) 10 9 import config 11 10 12 11 SRCDIR = os.path.abspath(config.SRCDIR) 13 12 BUILDDIR = os.path.abspath(config.BUILDDIR) 14 os.chdir(testpath)15 16 13 except: 17 14 print('ERROR: missing config.py, re-run configure script.', file=sys.stderr) … … 91 88 self.flags = """INSTALL_FLAGS="%s" """ % ("" if value else "-in-tree") 92 89 93 class Timeouts:94 def __init__(self, ts, tg):95 self.single = Timeouts.check(ts)96 self.total = Timeouts.check(tg)97 98 @classmethod99 def check(_, value):100 if value < 1:101 print("Timeouts must be at least 1 second", file=sys.stderr)102 sys.exit(1)103 104 return value105 106 90 def init( options ): 107 91 global arch … … 111 95 global debug 112 96 global install 113 global timeout114 97 115 98 dry_run = options.dry_run … … 119 102 install = Install(options.install) 120 103 arch = Architecture(options.arch) 121 timeout = Timeouts(options.timeout, options.global_timeout)122 104 123 105 … … 128 110 129 111 def validate(): 130 errf = os.path.join(BUILDDIR, ".validate.err") 131 make_ret, _ = tools.make( ".validate", error_file = errf, redirects = "2> /dev/null 1> /dev/null", ) 112 make_ret, _ = tools.make( ".validate", error_file = ".validate.err", redirects = "2> /dev/null 1> /dev/null", ) 132 113 if make_ret != 0: 133 with open ( errf, "r") as myfile:114 with open (".validate.err", "r") as myfile: 134 115 error=myfile.read() 135 116 print("ERROR: Invalid configuration %s:%s" % (arch.string, debug.string), file=sys.stderr) 136 117 print(" verify returned : \n%s" % error, file=sys.stderr) 137 tools.rm( errf)118 tools.rm("%s/.validate.err" % BUILDDIR) 138 119 sys.exit(1) 139 120 140 tools.rm( errf)121 tools.rm("%s/.validate.err" % BUILDDIR) -
tests/pybin/tools.py
r14b253d r636e1b9 36 36 37 37 def is_ascii(fname): 38 if settings.dry_run:39 print("is_ascii: %s" % fname)40 return True41 42 38 if not os.path.isfile(fname): 43 39 return False … … 136 132 # helper function to replace patterns in a file 137 133 def file_replace(fname, pat, s_after): 138 if settings.dry_run:139 print("replacing '%s' with '%s' in %s" % (pat, s_after, fname))140 return141 142 134 file = fileinput.FileInput(fname, inplace=True, backup='.bak') 143 135 for line in file: -
tests/test.py
r14b253d r636e1b9 88 88 parser.add_argument('--install', help='Run all tests based on installed binaries or tree binaries', type=yes_no, default='no') 89 89 parser.add_argument('--arch', help='Test for specific architecture', type=str, default='') 90 parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=60)91 parser.add_argument('--global-timeout', help='Maximum cumulative duration in seconds after the ALL tests are considered to have timed out', type=int, default=7200)92 90 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 93 91 parser.add_argument('--list', help='List all test available', action='store_true') … … 162 160 if settings.dry_run or fileIsExecutable(exe_file) : 163 161 # run test 164 retcode, _ = sh("timeout %d %s > %s 2>&1" % (settings.timeout.single,exe_file, out_file), input = in_file)162 retcode, _ = sh("timeout 60 %s > %s 2>&1" % (exe_file, out_file), input = in_file) 165 163 else : 166 164 # simply cat the result into the output … … 174 172 175 173 if retcode == 0: 176 fixoutput(out_file)177 174 if settings.generating : 178 175 # if we are ounly generating the output we still need to check that the test actually exists … … 185 182 else : 186 183 # fetch return code and error from the diff command 184 fixoutput(out_file) 187 185 retcode, error = diff(cmp_file, out_file) 188 186 … … 236 234 tests, 237 235 chunksize = 1 238 ).get( settings.timeout.total)236 ).get(7200) 239 237 except KeyboardInterrupt: 240 238 pool.terminate() … … 285 283 # users may want to simply list the tests 286 284 if options.list_comp : 287 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected - -install --timeout --global-timeout -j --jobs ", end='')285 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected -j --jobs ", end='') 288 286 print(" ".join(map(lambda t: "%s" % (t.target()), tests))) 289 287
Note:
See TracChangeset
for help on using the changeset viewer.