Changeset 74e5a3aa


Ignore:
Timestamp:
Dec 14, 2016, 3:31:11 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r375a068 r74e5a3aa  
    3333                dir ('src/tests') {
    3434                        if (full_build) {
    35                                 sh 'make all-tests'
     35                                sh 'make all-tests debug=yes'
     36                                sh 'make all-tests debug=no'
    3637                        }
    3738                        else {
  • src/tests/.expect/castError.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: Can't choose between alternatives for expression Cast of:
    32  Name: f
  • src/tests/.expect/constant0-1DP.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: duplicate object definition for 0: signed int
    32Error: duplicate object definition for 0: const signed int
  • src/tests/.expect/constant0-1NDDP.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: duplicate object definition for 0: signed int
    32Error: duplicate object definition for 0: const signed int
  • src/tests/.expect/declarationErrors.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: duplicate static in declaration of x1: static const volatile short int
    32
  • src/tests/.expect/dtor-early-exit-ERR1.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: jump to label 'L1' crosses initialization of y Branch (Goto)
    32
  • src/tests/.expect/dtor-early-exit-ERR2.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: jump to label 'L2' crosses initialization of y Branch (Goto)
    32
  • src/tests/.expect/memberCtors-ERR1.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: in void ?{}(struct B *b), field a2 used before being constructed
    32make: *** [memberCtors-ERR1] Error 1
  • src/tests/.expect/scopeErrors.txt

    r375a068 r74e5a3aa  
    1 CFA Version 1.0.0 (debug)
    21Error: duplicate object definition for thisIsAnError: signed int
    32Error: duplicate function definition for butThisIsAnError: function
  • src/tests/Makefile.am

    r375a068 r74e5a3aa  
    1515###############################################################################
    1616
     17debug=yes
     18
    1719# applies to both programs
    18 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2
     20EXTRA_FLAGS =
     21CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
    1922CC = @CFA_BINDIR@/cfa
    2023
     
    3033
    3134all-tests :
    32         @+python test.py --all          # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     35        @+python test.py --all --debug=${debug}         # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    3336
    3437clean-local :
     
    5457
    5558declarationSpecifier: declarationSpecifier.c
    56         ${CC} ${CFALGS} -CFA -XCFA -p ${<} -o ${@}
     59        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    5760
    5861gccExtensions : gccExtensions.c
     
    6366
    6467memberCtors-ERR1: memberCtors.c
    65         ${CC} ${CFALGS} -DERR1 ${<} -o ${@}
    66 
     68        ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
  • src/tests/Makefile.in

    r375a068 r74e5a3aa  
    123123CFA_LIBDIR = @CFA_LIBDIR@
    124124CFA_PREFIX = @CFA_PREFIX@
    125 
    126 # applies to both programs
    127 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2
     125CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
    128126CPP = @CPP@
    129127CPPFLAGS = @CPPFLAGS@
     
    223221top_builddir = @top_builddir@
    224222top_srcdir = @top_srcdir@
     223debug = yes
     224
     225# applies to both programs
     226EXTRA_FLAGS =
    225227fstream_test_SOURCES = fstream_test.c
    226228vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c
     
    652654
    653655all-tests :
    654         @+python test.py --all          # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     656        @+python test.py --all --debug=${debug}         # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    655657
    656658clean-local :
     
    676678
    677679declarationSpecifier: declarationSpecifier.c
    678         ${CC} ${CFALGS} -CFA -XCFA -p ${<} -o ${@}
     680        ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
    679681
    680682gccExtensions : gccExtensions.c
     
    685687
    686688memberCtors-ERR1: memberCtors.c
    687         ${CC} ${CFALGS} -DERR1 ${<} -o ${@}
     689        ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
    688690
    689691# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • src/tests/test.py

    r375a068 r74e5a3aa  
    104104#               running test functions
    105105################################################################################
    106 def run_single_test(test, generate, dry_run):
     106def run_single_test(test, generate, dry_run, debug):
    107107
    108108        # find the output file based on the test name and options flag
     
    113113        sh("rm -f %s > /dev/null 2>&1" % test.name, dry_run)
    114114
     115        options = "-debug" if debug else "-nodebug";
     116
    115117        # 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)
    117119
    118120        # if the make command succeds continue otherwise skip to diff
     
    165167        return retcode, error
    166168
    167 def run_test_instance(t, generate, dry_run) :
     169def run_test_instance(t, generate, dry_run, debug) :
    168170        # print formated name
    169171        name_txt = "%20s  " % t.name
    170172
    171173        #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)
    173175
    174176        # update output based on current action
     
    194196
    195197# run the given list of tests with the given parameters
    196 def run_tests(tests, generate, dry_run, jobs) :
     198def run_tests(tests, generate, dry_run, jobs, debug) :
    197199        # clean the sandbox from previous commands
    198200        sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run)
     
    207209        pool = Pool(jobs)
    208210        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)
    210212        except KeyboardInterrupt:
    211213                pool.terminate()
     
    222224        return 0
    223225
     226def 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
    224235################################################################################
    225236#               main loop
     
    227238# create a parser with the arguments for the tests script
    228239parser = argparse.ArgumentParser(description='Script which runs cforall tests')
     240parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no')
    229241parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true')
    230242parser.add_argument('--list', help='List all test available', action='store_true')
     
    296308        sys.exit(1)
    297309
    298 print('Running on %i cores' % options.jobs)
     310print('Running (%s) on %i cores' % ("debug" if options.debug else "no debug", options.jobs))
    299311make_cmd = "make" if make_flags else ("make -j%i" % options.jobs)
    300312
     
    305317else :
    306318        # 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.