- Timestamp:
- Sep 4, 2016, 10:34:35 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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, stuck-waitfor-destruct, with_gc
- Children:
- f04a8b81
- Parents:
- 28307be (diff), b16898e (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. - Location:
- src/tests
- Files:
-
- 3 added
- 2 deleted
- 7 edited
-
.expect/64/declarationSpecifier.txt (modified) (1 diff)
-
.expect/64/extension.txt (modified) (1 diff)
-
.expect/64/gccExtensions.txt (modified) (5 diffs)
-
.expect/ctorWarnings.txt (deleted)
-
.expect/memberCtors-ERR1.txt (added)
-
.expect/memberCtors.txt (added)
-
Makefile.am (modified) (1 diff)
-
Makefile.in (modified) (1 diff)
-
ctorWarnings.c (deleted)
-
memberCtors.c (added)
-
test.py (modified) (5 diffs)
-
typeof.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/.expect/64/declarationSpecifier.txt
r28307be r3403534 530 530 return ((int )_retVal0); 531 531 } 532 __attribute__ ((constructor(),)) static void _init_declarationSpecifier(void){533 ((void)___constructor__F_P13s__anonymous0_autogen___1(((struct __anonymous0 *)(&__x10__CV13s__anonymous0_1))));534 ((void)___constructor__F_P13s__anonymous1_autogen___1(((struct __anonymous1 *)(&__x11__CV13s__anonymous1_1))));535 ((void)___constructor__F_P13s__anonymous2_autogen___1(((struct __anonymous2 *)(&__x12__CV13s__anonymous2_1))));536 ((void)___constructor__F_P13s__anonymous3_autogen___1(((struct __anonymous3 *)(&__x13__CV13s__anonymous3_1))));537 ((void)___constructor__F_P13s__anonymous4_autogen___1(((struct __anonymous4 *)(&__x14__CV13s__anonymous4_1))));538 ((void)___constructor__F_P13s__anonymous5_autogen___1(((struct __anonymous5 *)(&__x15__CV13s__anonymous5_1))));539 ((void)___constructor__F_P13s__anonymous6_autogen___1(((struct __anonymous6 *)(&__x16__CV13s__anonymous6_1))));540 ((void)___constructor__F_P13s__anonymous7_autogen___1(((struct __anonymous7 *)(&__x17__CV13s__anonymous7_1))));541 ((void)___constructor__F_P13s__anonymous8_autogen___1(((struct __anonymous8 *)(&__x29__CV13s__anonymous8_1))));542 ((void)___constructor__F_P13s__anonymous9_autogen___1(((struct __anonymous9 *)(&__x30__CV13s__anonymous9_1))));543 ((void)___constructor__F_P14s__anonymous10_autogen___1(((struct __anonymous10 *)(&__x31__CV14s__anonymous10_1))));544 ((void)___constructor__F_P14s__anonymous11_autogen___1(((struct __anonymous11 *)(&__x32__CV14s__anonymous11_1))));545 ((void)___constructor__F_P14s__anonymous12_autogen___1(((struct __anonymous12 *)(&__x33__CV14s__anonymous12_1))));546 ((void)___constructor__F_P14s__anonymous13_autogen___1(((struct __anonymous13 *)(&__x34__CV14s__anonymous13_1))));547 ((void)___constructor__F_P14s__anonymous14_autogen___1(((struct __anonymous14 *)(&__x35__CV14s__anonymous14_1))));548 ((void)___constructor__F_P14s__anonymous15_autogen___1(((struct __anonymous15 *)(&__x36__CV14s__anonymous15_1))));549 }550 __attribute__ ((destructor(),)) static void _destroy_declarationSpecifier(void){551 ((void)___destructor__F_P14s__anonymous15_autogen___1(((struct __anonymous15 *)(&__x36__CV14s__anonymous15_1))));552 ((void)___destructor__F_P14s__anonymous14_autogen___1(((struct __anonymous14 *)(&__x35__CV14s__anonymous14_1))));553 ((void)___destructor__F_P14s__anonymous13_autogen___1(((struct __anonymous13 *)(&__x34__CV14s__anonymous13_1))));554 ((void)___destructor__F_P14s__anonymous12_autogen___1(((struct __anonymous12 *)(&__x33__CV14s__anonymous12_1))));555 ((void)___destructor__F_P14s__anonymous11_autogen___1(((struct __anonymous11 *)(&__x32__CV14s__anonymous11_1))));556 ((void)___destructor__F_P14s__anonymous10_autogen___1(((struct __anonymous10 *)(&__x31__CV14s__anonymous10_1))));557 ((void)___destructor__F_P13s__anonymous9_autogen___1(((struct __anonymous9 *)(&__x30__CV13s__anonymous9_1))));558 ((void)___destructor__F_P13s__anonymous8_autogen___1(((struct __anonymous8 *)(&__x29__CV13s__anonymous8_1))));559 ((void)___destructor__F_P13s__anonymous7_autogen___1(((struct __anonymous7 *)(&__x17__CV13s__anonymous7_1))));560 ((void)___destructor__F_P13s__anonymous6_autogen___1(((struct __anonymous6 *)(&__x16__CV13s__anonymous6_1))));561 ((void)___destructor__F_P13s__anonymous5_autogen___1(((struct __anonymous5 *)(&__x15__CV13s__anonymous5_1))));562 ((void)___destructor__F_P13s__anonymous4_autogen___1(((struct __anonymous4 *)(&__x14__CV13s__anonymous4_1))));563 ((void)___destructor__F_P13s__anonymous3_autogen___1(((struct __anonymous3 *)(&__x13__CV13s__anonymous3_1))));564 ((void)___destructor__F_P13s__anonymous2_autogen___1(((struct __anonymous2 *)(&__x12__CV13s__anonymous2_1))));565 ((void)___destructor__F_P13s__anonymous1_autogen___1(((struct __anonymous1 *)(&__x11__CV13s__anonymous1_1))));566 ((void)___destructor__F_P13s__anonymous0_autogen___1(((struct __anonymous0 *)(&__x10__CV13s__anonymous0_1))));567 } -
src/tests/.expect/64/extension.txt
r28307be r3403534 86 86 __extension__ int __c__i_2; 87 87 }; 88 int __i__i_2; 89 ((void)((*((int *)(&__i__i_2)))=(__extension__ __a__i_1+__extension__ 3)) /* ?{} */); 88 int __i__i_2 = ((int )(__extension__ __a__i_1+__extension__ 3)); 90 89 ((void)__extension__ 3); 91 90 ((void)__extension__ __a__i_1); -
src/tests/.expect/64/gccExtensions.txt
r28307be r3403534 76 76 ((void)((*((int *)(&(*___dst__P2sS_2).__c__i_2)))=__c__i_2) /* ?{} */); 77 77 } 78 int __i__i_2; 79 ((void)((*((int *)(&__i__i_2)))=__extension__ 3) /* ?{} */); 78 int __i__i_2 = ((int )__extension__ 3); 80 79 __extension__ int __a__i_2; 81 80 __extension__ int __b__i_2; … … 133 132 } 134 133 struct s3 __x1__3ss3_2; 135 ((void)___constructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));136 134 struct s3 __y1__3ss3_2; 137 ((void)___constructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));138 135 struct s4 { 139 136 int __i__i_2; … … 141 138 inline struct s4 ___operator_assign__F3ss4_P3ss43ss4_autogen___2(struct s4 *___dst__P3ss4_2, struct s4 ___src__3ss4_2){ 142 139 ((void)((*___dst__P3ss4_2).__i__i_2=___src__3ss4_2.__i__i_2)); 143 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));144 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));145 140 return ((struct s4 )___src__3ss4_2); 146 141 } … … 158 153 } 159 154 struct s4 __x2__3ss4_2; 160 ((void)___constructor__F_P3ss4_autogen___2(((struct s4 *)(&__x2__3ss4_2))));161 155 struct s4 __y2__3ss4_2; 162 ((void)___constructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));163 156 int __m1__A0i_2[((long unsigned int )10)]; 164 157 int __m2__A0A0i_2[((long unsigned int )10)][((long unsigned int )10)]; … … 166 159 int _retVal0 = { 0 }; 167 160 ((void)(_retVal0=0) /* ?{} */); 168 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));169 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__x2__3ss4_2))));170 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));171 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));172 161 return ((int )_retVal0); 173 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__y2__3ss4_2))));174 ((void)___destructor__F_P3ss4_autogen___2(((struct s4 *)(&__x2__3ss4_2))));175 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__y1__3ss3_2))));176 ((void)___destructor__F_P3ss3_autogen___2(((struct s3 *)(&__x1__3ss3_2))));177 162 } -
src/tests/Makefile.am
r28307be r3403534 62 62 ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 63 63 64 ctorWarnings: ctorWarnings.c65 ${CC} ${CFALGS} - CFA -XCFA -p ${<} -o /dev/null 2>${@}64 memberCtors-ERR1: memberCtors.c 65 ${CC} ${CFALGS} -DERR1 ${<} -o ${@} 66 66 -
src/tests/Makefile.in
r28307be r3403534 670 670 ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@} 671 671 672 ctorWarnings: ctorWarnings.c673 ${CC} ${CFALGS} - CFA -XCFA -p ${<} -o /dev/null 2>${@}672 memberCtors-ERR1: memberCtors.c 673 ${CC} ${CFALGS} -DERR1 ${<} -o ${@} 674 674 675 675 # Tell versions [3.59,3.63) of GNU make to not export all variables. -
src/tests/test.py
r28307be r3403534 2 2 from __future__ import print_function 3 3 4 from functools import partial 5 from multiprocessing import Pool 4 6 from os import listdir, environ 5 7 from os.path import isfile, join, splitext … … 102 104 # running test functions 103 105 ################################################################################ 104 def run_ test_instance(test, generate, dry_run):106 def run_single_test(test, generate, dry_run): 105 107 106 108 # find the output file based on the test name and options flag … … 163 165 return retcode, error 164 166 167 def run_test_instance(t, generate, dry_run) : 168 # print formated name 169 name_txt = "%20s " % t.name 170 171 #run the test instance and collect the result 172 test_failed, error = run_single_test(t, generate, dry_run) 173 174 # update output based on current action 175 if generate : 176 failed_txt = "ERROR" 177 success_txt = "Done" 178 else : 179 failed_txt = "FAILED" 180 success_txt = "PASSED" 181 182 #print result with error if needed 183 text = name_txt + (failed_txt if test_failed else success_txt) 184 out = sys.stdout 185 if error : 186 text = text + "\n" + error 187 out = sys.stderr 188 189 print(text, file = out); 190 sys.stdout.flush() 191 sys.stderr.flush() 192 193 return test_failed 194 165 195 # run the given list of tests with the given parameters 166 196 def run_tests(tests, generate, dry_run, jobs) : … … 174 204 print( "Regenerate tests for: " ) 175 205 176 failed = False; 177 # for eeach test to run 178 for t in tests: 179 # print formated name 180 name_txt = "%20s " % t.name 181 182 #run the test instance and collect the result 183 test_failed, error = run_test_instance(t, generate, dry_run) 184 185 # aggregate test suite result 186 failed = test_failed or failed 187 188 # update output based on current action 189 if generate : 190 failed_txt = "ERROR" 191 success_txt = "Done" 192 else : 193 failed_txt = "FAILED" 194 success_txt = "PASSED" 195 196 #print result with error if needed 197 text = name_txt + (failed_txt if test_failed else success_txt) 198 out = sys.stdout 199 if error : 200 text = text + "\n" + error 201 out = sys.stderr 202 203 print(text, file = out); 204 sys.stdout.flush() 205 sys.stderr.flush() 206 206 # for each test to run 207 pool = Pool(jobs) 208 try : 209 results = pool.map_async(partial(run_test_instance, generate=generate, dry_run=dry_run), tests ).get(99999999) 210 except KeyboardInterrupt: 211 pool.terminate() 212 print("Tests interrupted by user") 213 sys.exit(1) 207 214 208 215 #clean the workspace 209 216 sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run) 210 217 211 return 1 if failed else 0 218 for failed in results: 219 if failed : 220 return 1 221 222 return 0 212 223 213 224 ################################################################################ … … 279 290 280 291 # make sure we have a valid number of jobs that corresponds to user input 281 options.jobs = int(make_max_jobs) if make_max_jobs else options.jobs292 options.jobs = int(make_max_jobs) if make_max_jobs else (options.jobs if options.jobs else 1) 282 293 if options.jobs <= 0 : 283 294 print('ERROR: Invalid number of jobs', file=sys.stderr) 284 295 sys.exit(1) 285 296 297 print('Running on %i cores' % options.jobs) 298 286 299 # users may want to simply list the tests 287 300 if options.list : -
src/tests/typeof.c
r28307be r3403534 8 8 typeof( int ( int, int p ) ) *v7; 9 9 typeof( [int] ( int, int p ) ) *v8; 10 (typeof(v1)) v2; // cast with typeof 10 11 }
Note:
See TracChangeset
for help on using the changeset viewer.