Changes in / [c9e0991:3f91792]
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
rc9e0991 r3f91792 21 21 22 22 SUBDIRS = driver src . @LIBCFA_TARGET_DIRS@ 23 DIST_SUBDIRS = driver src . libcfa benchmark longrun_teststests tools tools/prettyprinter23 DIST_SUBDIRS = driver src . libcfa tests tools tools/prettyprinter 24 24 25 25 @LIBCFA_TARGET_MAKEFILES@ : Makefile $(srcdir)/libcfa/configure -
configure.ac
rc9e0991 r3f91792 3 3 4 4 AC_PREREQ([2.68]) 5 AC_INIT([cfa-cc],[1.0.0 .0],[cforall@plg.uwaterloo.ca])5 AC_INIT([cfa-cc],[1.0.0],[cforall@plg.uwaterloo.ca]) 6 6 AC_CONFIG_AUX_DIR([automake]) 7 7 AC_CONFIG_MACRO_DIRS([automake]) … … 28 28 # New AST toggling support 29 29 AH_TEMPLATE([CFA_USE_NEW_AST],[Sets whether or not to use the new-ast, this is adefault value and can be overrided by --old-ast and --new-ast]) 30 DEFAULT_NEW_AST=" False"30 DEFAULT_NEW_AST="True" 31 31 AC_ARG_ENABLE(new-ast, 32 32 [ --enable-new-ast whether or not to use new ast as the default AST algorithm], … … 35 35 no) newast=false; DEFAULT_NEW_AST="False" ;; 36 36 *) AC_MSG_ERROR([bad value ${enableval} for --enable-new-ast]) ;; 37 esac],[newast= false])37 esac],[newast=true]) 38 38 AC_DEFINE_UNQUOTED([CFA_USE_NEW_AST], $newast) 39 39 AC_SUBST(DEFAULT_NEW_AST) … … 103 103 # Create variables for commonly used targets 104 104 105 TOP_SRCDIR="$(readlink - m $ac_confdir/)/"106 TOP_BUILDDIR="$(readlink - m$ac_pwd/)/"105 TOP_SRCDIR="$(readlink -e $ac_abs_confdir/)/" 106 TOP_BUILDDIR="$(readlink -e $ac_pwd/)/" 107 107 108 108 AC_DEFINE_UNQUOTED(TOP_SRCDIR, "$TOP_SRCDIR", [Top src directory]) … … 139 139 \'--enable-gprofiler=*) ;; 140 140 \'--disable-gprofiler) ;; 141 142 # skip the target hosts 143 \'--enable-new-ast=*) ;; 144 \'--disable-new-ast) ;; 141 145 142 146 # skip this, it only causes problems … … 287 291 libcfa/Makefile:libcfa/Makefile.dist.in 288 292 tests/Makefile 289 longrun_tests/Makefile290 benchmark/Makefile291 benchmark/io/http/Makefile292 293 tools/Makefile 293 294 tools/prettyprinter/Makefile 294 295 ]) 295 296 297 # Some of our makefile don't need to be distributed 298 AM_CONDITIONAL([CFORALL_DISTRIBUTE], [test -e $TOP_SRCDIR/autogen.sh]) 299 AM_COND_IF([CFORALL_DISTRIBUTE], 300 [AC_CONFIG_FILES([ 301 longrun_tests/Makefile 302 benchmark/Makefile 303 benchmark/io/http/Makefile 304 ])]) 305 296 306 AC_CONFIG_LINKS([tests/test.py:tests/test.py]) 297 307 -
libcfa/configure.ac
rc9e0991 r3f91792 3 3 4 4 AC_PREREQ([2.68]) 5 AC_INIT([cfa-cc],[1.0.0 .0],[cforall@plg.uwaterloo.ca])5 AC_INIT([cfa-cc],[1.0.0],[cforall@plg.uwaterloo.ca]) 6 6 AC_CONFIG_AUX_DIR([automake]) 7 7 AC_CONFIG_MACRO_DIRS([automake]) -
libcfa/src/Makefile.am
rc9e0991 r3f91792 87 87 # not all platforms support concurrency, add option do disable it 88 88 inst_thread_headers_nosrc = \ 89 bits/collection.hfa \ 89 90 bits/random.hfa \ 91 bits/sequence.hfa \ 90 92 concurrency/clib/cfathread.h \ 91 93 concurrency/invoke.h \ -
libcfa/src/concurrency/preemption.cfa
rc9e0991 r3f91792 405 405 #define RELOC_SUFFIX "" 406 406 #endif 407 #define __cfaasm_label( label ) st atic struct asm_region label = \407 #define __cfaasm_label( label ) struct asm_region label = \ 408 408 ({ \ 409 409 struct asm_region region; \ … … 424 424 #define RELOC_SUFFIX "" 425 425 #endif 426 #define __cfaasm_label( label ) st atic struct asm_region label = \426 #define __cfaasm_label( label ) struct asm_region label = \ 427 427 ({ \ 428 428 struct asm_region region; \ … … 437 437 #ifdef __PIC__ 438 438 // Note that this works only for gcc 439 #define __cfaasm_label( label ) st atic struct asm_region label = \439 #define __cfaasm_label( label ) struct asm_region label = \ 440 440 ({ \ 441 441 struct asm_region region; \ … … 452 452 #error this is not the right thing to do 453 453 /* 454 #define __cfaasm_label( label ) st atic struct asm_region label = \454 #define __cfaasm_label( label ) struct asm_region label = \ 455 455 ({ \ 456 456 struct asm_region region; \ -
src/AST/module.mk
rc9e0991 r3f91792 59 59 AST/SymbolTable.cpp \ 60 60 AST/SymbolTable.hpp \ 61 AST/TranslationUnit.hpp \ 61 62 AST/Type.cpp \ 62 63 AST/Type.hpp \ -
tests/Makefile.am
rc9e0991 r3f91792 68 68 .INTERMEDIATE: .validate .validate.cfa 69 69 EXTRA_PROGRAMS = avl_test .dummy_hack # build but do not install 70 EXTRA_DIST = test.py \ 71 pybin/__init__.py \ 72 pybin/print-core.gdb \ 73 pybin/settings.py \ 74 pybin/test_run.py \ 75 pybin/tools.py \ 76 long_tests.hfa \ 77 avltree/avl.h \ 78 avltree/avl-private.h \ 79 concurrent/clib.c \ 80 exceptions/with-threads.hfa \ 81 exceptions/except-io.hfa 82 83 dist-hook: 84 echo "Gathering test files" 85 for file in `${TEST_PY} --list-dist`; do \ 86 if test -f ${srcdir}/$${file}; then \ 87 $(MKDIR_P) $$(dirname ${distdir}/$${file}); \ 88 cp -df ${srcdir}/$${file} ${distdir}/$${file}; \ 89 fi; \ 90 done 70 91 71 92 avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa -
tests/pybin/tools.py
rc9e0991 r3f91792 191 191 cmd = [s for s in cmd if s] 192 192 return sh(*cmd, output_file=output_file, error=error) 193 194 def make_recon(target): 195 cmd = [ 196 *settings.make, 197 '-W', 198 os.path.abspath(os.path.join(settings.BUILDDIR, '../driver/cfa')), 199 '--recon', 200 target 201 ] 202 cmd = [s for s in cmd if s] 203 return sh(*cmd, output_file=subprocess.PIPE) 193 204 194 205 def which(program): -
tests/test.py
rc9e0991 r3f91792 143 143 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int) 144 144 parser.add_argument('--list-comp', help='List all valide arguments', action='store_true') 145 parser.add_argument('--list-dist', help='List all tests for distribution', action='store_true') 145 146 parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All if omitted', action='append') 146 147 parser.add_argument('-E','--exclude', help='Directory of test to exclude, can be used multiple time, None if omitted', action='append') … … 155 156 156 157 # script must have at least some tests to run or be listing 157 listing = options.list or options.list_comp 158 listing = options.list or options.list_comp or options.list_dist 158 159 all_tests = options.all 159 160 some_tests = len(options.tests) > 0 … … 334 335 settings.init( options ) 335 336 336 # users may want to simply list the tests 337 # -------------------------------------------------- 338 # list all the test for auto completion programs 339 # not pretty, single line, with the command line options 337 340 if options.list_comp : 338 341 # fetch the liest of all valid tests … … 340 343 341 344 # print the possible options 342 print("-h --help --debug --dry-run --list --a rch --all --regenerate-expected --archive-errors --install --timeout --global-timeout --timeout-with-gdb -j --jobs -I --include -E --exclude --continue ", end='')345 print("-h --help --debug --dry-run --list --ast=new --ast=old --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout --timeout-with-gdb -j --jobs -I --include -E --exclude --continue ", end='') 343 346 print(" ".join(map(lambda t: "%s" % (t.target()), tests))) 344 347 345 elif options.list : 348 # done 349 sys.exit(0) 350 351 # -------------------------------------------------- 352 # list all the test for auto completion programs 353 if options.list_dist : 354 # fetch the liest of all valid tests 355 tests = list_tests( None, None ) 356 357 for t in tests: 358 print(os.path.relpath(t.expect(), settings.SRCDIR), end=' ') 359 print(os.path.relpath(t.input() , settings.SRCDIR), end=' ') 360 code, out = make_recon(t.target()) 361 362 if code != 0: 363 print('ERROR: recond failed for test {}'.format(t.target()), file=sys.stderr) 364 sys.exit(1) 365 366 print(' '.join(re.findall('([^\s]+\.cfa)', out)), end=' ') 367 368 print('') 369 370 # done 371 sys.exit(0) 372 373 374 # -------------------------------------------------- 375 # list all the tests for users, in a pretty format 376 if options.list : 346 377 # fetch the liest of all valid tests 347 378 tests = list_tests( options.include, options.exclude ) … … 350 381 fancy_print("\n".join(map(lambda t: t.toString(), tests))) 351 382 383 # done 384 sys.exit(0) 385 386 # fetch the liest of all valid tests 387 all_tests = list_tests( options.include, options.exclude ) 388 389 # if user wants all tests than no other treatement of the test list is required 390 if options.all or options.include : 391 tests = all_tests 392 393 #otherwise we need to validate that the test list that was entered is valid 352 394 else : 353 # fetch the liest of all valid tests 354 all_tests = list_tests( options.include, options.exclude ) 355 356 # if user wants all tests than no other treatement of the test list is required 357 if options.all or options.include : 358 tests = all_tests 359 360 #otherwise we need to validate that the test list that was entered is valid 361 else : 362 tests = valid_tests( options ) 363 364 # make sure we have at least some test to run 365 if not tests : 366 print('ERROR: No valid test to run', file=sys.stderr) 367 sys.exit(1) 368 369 # prep invariants 370 settings.prep_output(tests) 371 failed = 0 372 373 # check if the expected files aren't empty 374 if not options.regenerate_expected: 375 for t in tests: 376 if is_empty(t.expect()): 377 print('WARNING: test "{}" has empty .expect file'.format(t.target()), file=sys.stderr) 378 379 # for each build configurations, run the test 380 with Timed() as total_dur: 381 for ast, arch, debug, install in itertools.product(settings.all_ast, settings.all_arch, settings.all_debug, settings.all_install): 382 settings.ast = ast 383 settings.arch = arch 384 settings.debug = debug 385 settings.install = install 386 387 # filter out the tests for a different architecture 388 # tests are the same across debug/install 389 local_tests = settings.ast.filter( tests ) 390 local_tests = settings.arch.filter( local_tests ) 391 options.jobs, forceJobs = job_count( options, local_tests ) 392 settings.update_make_cmd(forceJobs, options.jobs) 393 394 # check the build configuration works 395 settings.validate() 396 397 # print configuration 398 print('%s %i tests on %i cores (%s:%s - %s)' % ( 399 'Regenerating' if settings.generating else 'Running', 400 len(local_tests), 401 options.jobs, 402 settings.ast.string, 403 settings.arch.string, 404 settings.debug.string 405 )) 406 if not local_tests : 407 print('WARNING: No tests for this configuration') 408 continue 409 410 # otherwise run all tests and make sure to return the correct error code 411 failed = run_tests(local_tests, options.jobs) 412 if failed: 413 result = 1 414 if not settings.continue_: 415 break 416 417 print('Tests took %s' % fmtDur( total_dur.duration )) 418 sys.exit( failed ) 395 tests = valid_tests( options ) 396 397 # make sure we have at least some test to run 398 if not tests : 399 print('ERROR: No valid test to run', file=sys.stderr) 400 sys.exit(1) 401 402 # prep invariants 403 settings.prep_output(tests) 404 failed = 0 405 406 # check if the expected files aren't empty 407 if not options.regenerate_expected: 408 for t in tests: 409 if is_empty(t.expect()): 410 print('WARNING: test "{}" has empty .expect file'.format(t.target()), file=sys.stderr) 411 412 # for each build configurations, run the test 413 with Timed() as total_dur: 414 for ast, arch, debug, install in itertools.product(settings.all_ast, settings.all_arch, settings.all_debug, settings.all_install): 415 settings.ast = ast 416 settings.arch = arch 417 settings.debug = debug 418 settings.install = install 419 420 # filter out the tests for a different architecture 421 # tests are the same across debug/install 422 local_tests = settings.ast.filter( tests ) 423 local_tests = settings.arch.filter( local_tests ) 424 options.jobs, forceJobs = job_count( options, local_tests ) 425 settings.update_make_cmd(forceJobs, options.jobs) 426 427 # check the build configuration works 428 settings.validate() 429 430 # print configuration 431 print('%s %i tests on %i cores (%s:%s - %s)' % ( 432 'Regenerating' if settings.generating else 'Running', 433 len(local_tests), 434 options.jobs, 435 settings.ast.string, 436 settings.arch.string, 437 settings.debug.string 438 )) 439 if not local_tests : 440 print('WARNING: No tests for this configuration') 441 continue 442 443 # otherwise run all tests and make sure to return the correct error code 444 failed = run_tests(local_tests, options.jobs) 445 if failed: 446 result = 1 447 if not settings.continue_: 448 break 449 450 print('Tests took %s' % fmtDur( total_dur.duration )) 451 sys.exit( failed )
Note:
See TracChangeset
for help on using the changeset viewer.