Changeset 74e5a3aa
- Timestamp:
- Dec 14, 2016, 3:31:11 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- a7741435, c5a8c5b
- Parents:
- 375a068 (diff), 4782b39 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r375a068 r74e5a3aa 33 33 dir ('src/tests') { 34 34 if (full_build) { 35 sh 'make all-tests' 35 sh 'make all-tests debug=yes' 36 sh 'make all-tests debug=no' 36 37 } 37 38 else { -
src/tests/.expect/castError.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: Can't choose between alternatives for expression Cast of: 3 2 Name: f -
src/tests/.expect/constant0-1DP.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: duplicate object definition for 0: signed int 3 2 Error: duplicate object definition for 0: const signed int -
src/tests/.expect/constant0-1NDDP.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: duplicate object definition for 0: signed int 3 2 Error: duplicate object definition for 0: const signed int -
src/tests/.expect/declarationErrors.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: duplicate static in declaration of x1: static const volatile short int 3 2 -
src/tests/.expect/dtor-early-exit-ERR1.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: jump to label 'L1' crosses initialization of y Branch (Goto) 3 2 -
src/tests/.expect/dtor-early-exit-ERR2.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: jump to label 'L2' crosses initialization of y Branch (Goto) 3 2 -
src/tests/.expect/memberCtors-ERR1.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: in void ?{}(struct B *b), field a2 used before being constructed 3 2 make: *** [memberCtors-ERR1] Error 1 -
src/tests/.expect/scopeErrors.txt
r375a068 r74e5a3aa 1 CFA Version 1.0.0 (debug)2 1 Error: duplicate object definition for thisIsAnError: signed int 3 2 Error: duplicate function definition for butThisIsAnError: function -
src/tests/Makefile.am
r375a068 r74e5a3aa 15 15 ############################################################################### 16 16 17 debug=yes 18 17 19 # applies to both programs 18 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2 20 EXTRA_FLAGS = 21 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS} 19 22 CC = @CFA_BINDIR@/cfa 20 23 … … 30 33 31 34 all-tests : 32 @+python test.py --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program35 @+python test.py --all --debug=${debug} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 33 36 34 37 clean-local : … … 54 57 55 58 declarationSpecifier: declarationSpecifier.c 56 ${CC} ${CF ALGS} -CFA -XCFA -p ${<} -o ${@}59 ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 57 60 58 61 gccExtensions : gccExtensions.c … … 63 66 64 67 memberCtors-ERR1: memberCtors.c 65 ${CC} ${CFALGS} -DERR1 ${<} -o ${@} 66 68 ${CC} ${CFLAGS} -DERR1 ${<} -o ${@} -
src/tests/Makefile.in
r375a068 r74e5a3aa 123 123 CFA_LIBDIR = @CFA_LIBDIR@ 124 124 CFA_PREFIX = @CFA_PREFIX@ 125 126 # applies to both programs 127 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2 125 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS} 128 126 CPP = @CPP@ 129 127 CPPFLAGS = @CPPFLAGS@ … … 223 221 top_builddir = @top_builddir@ 224 222 top_srcdir = @top_srcdir@ 223 debug = yes 224 225 # applies to both programs 226 EXTRA_FLAGS = 225 227 fstream_test_SOURCES = fstream_test.c 226 228 vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c … … 652 654 653 655 all-tests : 654 @+python test.py --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program656 @+python test.py --all --debug=${debug} # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 655 657 656 658 clean-local : … … 676 678 677 679 declarationSpecifier: declarationSpecifier.c 678 ${CC} ${CF ALGS} -CFA -XCFA -p ${<} -o ${@}680 ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 679 681 680 682 gccExtensions : gccExtensions.c … … 685 687 686 688 memberCtors-ERR1: memberCtors.c 687 ${CC} ${CF ALGS} -DERR1 ${<} -o ${@}689 ${CC} ${CFLAGS} -DERR1 ${<} -o ${@} 688 690 689 691 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
src/tests/test.py
r375a068 r74e5a3aa 104 104 # running test functions 105 105 ################################################################################ 106 def run_single_test(test, generate, dry_run ):106 def run_single_test(test, generate, dry_run, debug): 107 107 108 108 # find the output file based on the test name and options flag … … 113 113 sh("rm -f %s > /dev/null 2>&1" % test.name, dry_run) 114 114 115 options = "-debug" if debug else "-nodebug"; 116 115 117 # build, skipping to next test on error 116 make_ret, _ = sh(" %s %s 2> %s 1> /dev/null" % (make_cmd, test.name, out_file), dry_run)118 make_ret, _ = sh("""%s EXTRA_FLAGS="-quiet %s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run) 117 119 118 120 # if the make command succeds continue otherwise skip to diff … … 165 167 return retcode, error 166 168 167 def run_test_instance(t, generate, dry_run ) :169 def run_test_instance(t, generate, dry_run, debug) : 168 170 # print formated name 169 171 name_txt = "%20s " % t.name 170 172 171 173 #run the test instance and collect the result 172 test_failed, error = run_single_test(t, generate, dry_run )174 test_failed, error = run_single_test(t, generate, dry_run, debug) 173 175 174 176 # update output based on current action … … 194 196 195 197 # run the given list of tests with the given parameters 196 def run_tests(tests, generate, dry_run, jobs ) :198 def run_tests(tests, generate, dry_run, jobs, debug) : 197 199 # clean the sandbox from previous commands 198 200 sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run) … … 207 209 pool = Pool(jobs) 208 210 try : 209 results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run ), tests ).get(99999999)211 results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run, debug=debug), tests ).get(99999999) 210 212 except KeyboardInterrupt: 211 213 pool.terminate() … … 222 224 return 0 223 225 226 def yes_no(string): 227 if string == "yes" : 228 return True 229 if string == "no" : 230 return False 231 raise argparse.ArgumentTypeError(msg) 232 return False 233 234 224 235 ################################################################################ 225 236 # main loop … … 227 238 # create a parser with the arguments for the tests script 228 239 parser = argparse.ArgumentParser(description='Script which runs cforall tests') 240 parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no') 229 241 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 230 242 parser.add_argument('--list', help='List all test available', action='store_true') … … 296 308 sys.exit(1) 297 309 298 print('Running on %i cores' % options.jobs)310 print('Running (%s) on %i cores' % ("debug" if options.debug else "no debug", options.jobs)) 299 311 make_cmd = "make" if make_flags else ("make -j%i" % options.jobs) 300 312 … … 305 317 else : 306 318 # otherwise run all tests and make sure to return the correct error code 307 sys.exit( run_tests(tests, options.regenerate_expected, options.dry_run, options.jobs ) )319 sys.exit( run_tests(tests, options.regenerate_expected, options.dry_run, options.jobs, options.debug) )
Note: See TracChangeset
for help on using the changeset viewer.