Changes in / [3f91792:c9e0991]


Ignore:
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    r3f91792 rc9e0991  
    2121
    2222SUBDIRS = driver src . @LIBCFA_TARGET_DIRS@
    23 DIST_SUBDIRS = driver src . libcfa tests tools tools/prettyprinter
     23DIST_SUBDIRS = driver src . libcfa benchmark longrun_tests tests tools tools/prettyprinter
    2424
    2525@LIBCFA_TARGET_MAKEFILES@ : Makefile $(srcdir)/libcfa/configure
  • configure.ac

    r3f91792 rc9e0991  
    33
    44AC_PREREQ([2.68])
    5 AC_INIT([cfa-cc],[1.0.0],[cforall@plg.uwaterloo.ca])
     5AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca])
    66AC_CONFIG_AUX_DIR([automake])
    77AC_CONFIG_MACRO_DIRS([automake])
     
    2828# New AST toggling support
    2929AH_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="True"
     30DEFAULT_NEW_AST="False"
    3131AC_ARG_ENABLE(new-ast,
    3232        [  --enable-new-ast     whether or not to use new ast as the default AST algorithm],
     
    3535                no)  newast=false; DEFAULT_NEW_AST="False" ;;
    3636                *) AC_MSG_ERROR([bad value ${enableval} for --enable-new-ast]) ;;
    37         esac],[newast=true])
     37        esac],[newast=false])
    3838AC_DEFINE_UNQUOTED([CFA_USE_NEW_AST], $newast)
    3939AC_SUBST(DEFAULT_NEW_AST)
     
    103103# Create variables for commonly used targets
    104104
    105 TOP_SRCDIR="$(readlink -e $ac_abs_confdir/)/"
    106 TOP_BUILDDIR="$(readlink -e $ac_pwd/)/"
     105TOP_SRCDIR="$(readlink -m $ac_confdir/)/"
     106TOP_BUILDDIR="$(readlink -m $ac_pwd/)/"
    107107
    108108AC_DEFINE_UNQUOTED(TOP_SRCDIR, "$TOP_SRCDIR", [Top src directory])
     
    139139                \'--enable-gprofiler=*) ;;
    140140                \'--disable-gprofiler) ;;
    141 
    142                 # skip the target hosts
    143                 \'--enable-new-ast=*) ;;
    144                 \'--disable-new-ast) ;;
    145141
    146142                # skip this, it only causes problems
     
    291287        libcfa/Makefile:libcfa/Makefile.dist.in
    292288        tests/Makefile
     289        longrun_tests/Makefile
     290        benchmark/Makefile
     291        benchmark/io/http/Makefile
    293292        tools/Makefile
    294293        tools/prettyprinter/Makefile
    295294        ])
    296295
    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 
    306296AC_CONFIG_LINKS([tests/test.py:tests/test.py])
    307297
  • libcfa/configure.ac

    r3f91792 rc9e0991  
    33
    44AC_PREREQ([2.68])
    5 AC_INIT([cfa-cc],[1.0.0],[cforall@plg.uwaterloo.ca])
     5AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca])
    66AC_CONFIG_AUX_DIR([automake])
    77AC_CONFIG_MACRO_DIRS([automake])
  • libcfa/src/Makefile.am

    r3f91792 rc9e0991  
    8787# not all platforms support concurrency, add option do disable it
    8888inst_thread_headers_nosrc = \
    89         bits/collection.hfa \
    9089        bits/random.hfa \
    91         bits/sequence.hfa \
    9290        concurrency/clib/cfathread.h \
    9391        concurrency/invoke.h \
  • libcfa/src/concurrency/preemption.cfa

    r3f91792 rc9e0991  
    405405                #define RELOC_SUFFIX ""
    406406        #endif
    407         #define __cfaasm_label( label ) struct asm_region label = \
     407        #define __cfaasm_label( label ) static struct asm_region label = \
    408408                ({ \
    409409                        struct asm_region region; \
     
    424424                #define RELOC_SUFFIX ""
    425425        #endif
    426         #define __cfaasm_label( label ) struct asm_region label = \
     426        #define __cfaasm_label( label ) static struct asm_region label = \
    427427                ({ \
    428428                        struct asm_region region; \
     
    437437        #ifdef __PIC__
    438438                // Note that this works only for gcc
    439                 #define __cfaasm_label( label ) struct asm_region label = \
     439                #define __cfaasm_label( label ) static struct asm_region label = \
    440440                ({ \
    441441                        struct asm_region region; \
     
    452452                #error this is not the right thing to do
    453453                /*
    454                 #define __cfaasm_label( label ) struct asm_region label = \
     454                #define __cfaasm_label( label ) static struct asm_region label = \
    455455                ({ \
    456456                        struct asm_region region; \
  • src/AST/module.mk

    r3f91792 rc9e0991  
    5959        AST/SymbolTable.cpp \
    6060        AST/SymbolTable.hpp \
    61         AST/TranslationUnit.hpp \
    6261        AST/Type.cpp \
    6362        AST/Type.hpp \
  • tests/Makefile.am

    r3f91792 rc9e0991  
    6868.INTERMEDIATE: .validate .validate.cfa
    6969EXTRA_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
    9170
    9271avl_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

    r3f91792 rc9e0991  
    191191        cmd = [s for s in cmd if s]
    192192        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)
    204193
    205194def which(program):
  • tests/test.py

    r3f91792 rc9e0991  
    143143        parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int)
    144144        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')
    146145        parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All  if omitted', action='append')
    147146        parser.add_argument('-E','--exclude', help='Directory of test to exclude, can be used multiple time, None if omitted', action='append')
     
    156155
    157156        # script must have at least some tests to run or be listing
    158         listing    = options.list or options.list_comp or options.list_dist
     157        listing    = options.list or options.list_comp
    159158        all_tests  = options.all
    160159        some_tests = len(options.tests) > 0
     
    335334        settings.init( options )
    336335
    337         # --------------------------------------------------
    338         # list all the test for auto completion programs
    339         # not pretty, single line, with the command line options
     336        # users may want to simply list the tests
    340337        if options.list_comp :
    341338                # fetch the liest of all valid tests
     
    343340
    344341                # print the possible options
    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='')
     342                print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout --timeout-with-gdb -j --jobs -I --include -E --exclude --continue ", end='')
    346343                print(" ".join(map(lambda t: "%s" % (t.target()), tests)))
    347344
    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 :
     345        elif options.list :
    377346                # fetch the liest of all valid tests
    378347                tests = list_tests( options.include, options.exclude )
     
    381350                fancy_print("\n".join(map(lambda t: t.toString(), tests)))
    382351
    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
    394352        else :
    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 )
     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 )
Note: See TracChangeset for help on using the changeset viewer.