Changes in / [74e5a3aa:375a068]
- Files:
-
- 12 edited
-
Jenkinsfile (modified) (1 diff)
-
src/tests/.expect/castError.txt (modified) (1 diff)
-
src/tests/.expect/constant0-1DP.txt (modified) (1 diff)
-
src/tests/.expect/constant0-1NDDP.txt (modified) (1 diff)
-
src/tests/.expect/declarationErrors.txt (modified) (1 diff)
-
src/tests/.expect/dtor-early-exit-ERR1.txt (modified) (1 diff)
-
src/tests/.expect/dtor-early-exit-ERR2.txt (modified) (1 diff)
-
src/tests/.expect/memberCtors-ERR1.txt (modified) (1 diff)
-
src/tests/.expect/scopeErrors.txt (modified) (1 diff)
-
src/tests/Makefile.am (modified) (4 diffs)
-
src/tests/Makefile.in (modified) (5 diffs)
-
src/tests/test.py (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r74e5a3aa r375a068 33 33 dir ('src/tests') { 34 34 if (full_build) { 35 sh 'make all-tests debug=yes' 36 sh 'make all-tests debug=no' 35 sh 'make all-tests' 37 36 } 38 37 else { -
src/tests/.expect/castError.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: Can't choose between alternatives for expression Cast of: 2 3 Name: f -
src/tests/.expect/constant0-1DP.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: duplicate object definition for 0: signed int 2 3 Error: duplicate object definition for 0: const signed int -
src/tests/.expect/constant0-1NDDP.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: duplicate object definition for 0: signed int 2 3 Error: duplicate object definition for 0: const signed int -
src/tests/.expect/declarationErrors.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: duplicate static in declaration of x1: static const volatile short int 2 3 -
src/tests/.expect/dtor-early-exit-ERR1.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: jump to label 'L1' crosses initialization of y Branch (Goto) 2 3 -
src/tests/.expect/dtor-early-exit-ERR2.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: jump to label 'L2' crosses initialization of y Branch (Goto) 2 3 -
src/tests/.expect/memberCtors-ERR1.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: in void ?{}(struct B *b), field a2 used before being constructed 2 3 make: *** [memberCtors-ERR1] Error 1 -
src/tests/.expect/scopeErrors.txt
r74e5a3aa r375a068 1 CFA Version 1.0.0 (debug) 1 2 Error: duplicate object definition for thisIsAnError: signed int 2 3 Error: duplicate function definition for butThisIsAnError: function -
src/tests/Makefile.am
r74e5a3aa r375a068 15 15 ############################################################################### 16 16 17 debug=yes18 19 17 # applies to both programs 20 EXTRA_FLAGS = 21 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS} 18 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2 22 19 CC = @CFA_BINDIR@/cfa 23 20 … … 33 30 34 31 all-tests : 35 @+python test.py --all --debug=${debug}# '@' => do not echo command (SILENT), '+' => allows recursive make from within python program32 @+python test.py --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 36 33 37 34 clean-local : … … 57 54 58 55 declarationSpecifier: declarationSpecifier.c 59 ${CC} ${CF LAGS} -CFA -XCFA -p ${<} -o ${@}56 ${CC} ${CFALGS} -CFA -XCFA -p ${<} -o ${@} 60 57 61 58 gccExtensions : gccExtensions.c … … 66 63 67 64 memberCtors-ERR1: memberCtors.c 68 ${CC} ${CFLAGS} -DERR1 ${<} -o ${@} 65 ${CC} ${CFALGS} -DERR1 ${<} -o ${@} 66 -
src/tests/Makefile.in
r74e5a3aa r375a068 123 123 CFA_LIBDIR = @CFA_LIBDIR@ 124 124 CFA_PREFIX = @CFA_PREFIX@ 125 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS} 125 126 # applies to both programs 127 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2 126 128 CPP = @CPP@ 127 129 CPPFLAGS = @CPPFLAGS@ … … 221 223 top_builddir = @top_builddir@ 222 224 top_srcdir = @top_srcdir@ 223 debug = yes224 225 # applies to both programs226 EXTRA_FLAGS =227 225 fstream_test_SOURCES = fstream_test.c 228 226 vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c … … 654 652 655 653 all-tests : 656 @+python test.py --all --debug=${debug}# '@' => do not echo command (SILENT), '+' => allows recursive make from within python program654 @+python test.py --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program 657 655 658 656 clean-local : … … 678 676 679 677 declarationSpecifier: declarationSpecifier.c 680 ${CC} ${CF LAGS} -CFA -XCFA -p ${<} -o ${@}678 ${CC} ${CFALGS} -CFA -XCFA -p ${<} -o ${@} 681 679 682 680 gccExtensions : gccExtensions.c … … 687 685 688 686 memberCtors-ERR1: memberCtors.c 689 ${CC} ${CF LAGS} -DERR1 ${<} -o ${@}687 ${CC} ${CFALGS} -DERR1 ${<} -o ${@} 690 688 691 689 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
src/tests/test.py
r74e5a3aa r375a068 104 104 # running test functions 105 105 ################################################################################ 106 def run_single_test(test, generate, dry_run , debug):106 def run_single_test(test, generate, dry_run): 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 117 115 # build, skipping to next test on error 118 make_ret, _ = sh(" ""%s EXTRA_FLAGS="-quiet %s" %s 2> %s 1> /dev/null""" % (make_cmd, options, test.name, out_file), dry_run)116 make_ret, _ = sh("%s %s 2> %s 1> /dev/null" % (make_cmd, test.name, out_file), dry_run) 119 117 120 118 # if the make command succeds continue otherwise skip to diff … … 167 165 return retcode, error 168 166 169 def run_test_instance(t, generate, dry_run , debug) :167 def run_test_instance(t, generate, dry_run) : 170 168 # print formated name 171 169 name_txt = "%20s " % t.name 172 170 173 171 #run the test instance and collect the result 174 test_failed, error = run_single_test(t, generate, dry_run , debug)172 test_failed, error = run_single_test(t, generate, dry_run) 175 173 176 174 # update output based on current action … … 196 194 197 195 # run the given list of tests with the given parameters 198 def run_tests(tests, generate, dry_run, jobs , debug) :196 def run_tests(tests, generate, dry_run, jobs) : 199 197 # clean the sandbox from previous commands 200 198 sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run) … … 209 207 pool = Pool(jobs) 210 208 try : 211 results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run , debug=debug), tests ).get(99999999)209 results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run), tests ).get(99999999) 212 210 except KeyboardInterrupt: 213 211 pool.terminate() … … 224 222 return 0 225 223 226 def yes_no(string):227 if string == "yes" :228 return True229 if string == "no" :230 return False231 raise argparse.ArgumentTypeError(msg)232 return False233 234 235 224 ################################################################################ 236 225 # main loop … … 238 227 # create a parser with the arguments for the tests script 239 228 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')241 229 parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true') 242 230 parser.add_argument('--list', help='List all test available', action='store_true') … … 308 296 sys.exit(1) 309 297 310 print('Running (%s) on %i cores' % ("debug" if options.debug else "no debug", options.jobs))298 print('Running on %i cores' % options.jobs) 311 299 make_cmd = "make" if make_flags else ("make -j%i" % options.jobs) 312 300 … … 317 305 else : 318 306 # otherwise run all tests and make sure to return the correct error code 319 sys.exit( run_tests(tests, options.regenerate_expected, options.dry_run, options.jobs , options.debug) )307 sys.exit( run_tests(tests, options.regenerate_expected, options.dry_run, options.jobs) )
Note:
See TracChangeset
for help on using the changeset viewer.