Changes in / [74e5a3aa:375a068]


Ignore:
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

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

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

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

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

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

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

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

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

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

    r74e5a3aa r375a068  
    1515###############################################################################
    1616
    17 debug=yes
    18 
    1917# applies to both programs
    20 EXTRA_FLAGS =
    21 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
     18CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2
    2219CC = @CFA_BINDIR@/cfa
    2320
     
    3330
    3431all-tests :
    35         @+python test.py --all --debug=${debug}         # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     32        @+python test.py --all          # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    3633
    3734clean-local :
     
    5754
    5855declarationSpecifier: declarationSpecifier.c
    59         ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     56        ${CC} ${CFALGS} -CFA -XCFA -p ${<} -o ${@}
    6057
    6158gccExtensions : gccExtensions.c
     
    6663
    6764memberCtors-ERR1: memberCtors.c
    68         ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
     65        ${CC} ${CFALGS} -DERR1 ${<} -o ${@}
     66
  • src/tests/Makefile.in

    r74e5a3aa r375a068  
    123123CFA_LIBDIR = @CFA_LIBDIR@
    124124CFA_PREFIX = @CFA_PREFIX@
    125 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ ${EXTRA_FLAGS}
     125
     126# applies to both programs
     127CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2
    126128CPP = @CPP@
    127129CPPFLAGS = @CPPFLAGS@
     
    221223top_builddir = @top_builddir@
    222224top_srcdir = @top_srcdir@
    223 debug = yes
    224 
    225 # applies to both programs
    226 EXTRA_FLAGS =
    227225fstream_test_SOURCES = fstream_test.c
    228226vector_test_SOURCES = vector/vector_int.c vector/array.c vector/vector_test.c
     
    654652
    655653all-tests :
    656         @+python test.py --all --debug=${debug}         # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     654        @+python test.py --all          # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    657655
    658656clean-local :
     
    678676
    679677declarationSpecifier: declarationSpecifier.c
    680         ${CC} ${CFLAGS} -CFA -XCFA -p ${<} -o ${@}
     678        ${CC} ${CFALGS} -CFA -XCFA -p ${<} -o ${@}
    681679
    682680gccExtensions : gccExtensions.c
     
    687685
    688686memberCtors-ERR1: memberCtors.c
    689         ${CC} ${CFLAGS} -DERR1 ${<} -o ${@}
     687        ${CC} ${CFALGS} -DERR1 ${<} -o ${@}
    690688
    691689# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • src/tests/test.py

    r74e5a3aa r375a068  
    104104#               running test functions
    105105################################################################################
    106 def run_single_test(test, generate, dry_run, debug):
     106def run_single_test(test, generate, dry_run):
    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 
    117115        # 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)
    119117
    120118        # if the make command succeds continue otherwise skip to diff
     
    167165        return retcode, error
    168166
    169 def run_test_instance(t, generate, dry_run, debug) :
     167def run_test_instance(t, generate, dry_run) :
    170168        # print formated name
    171169        name_txt = "%20s  " % t.name
    172170
    173171        #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)
    175173
    176174        # update output based on current action
     
    196194
    197195# run the given list of tests with the given parameters
    198 def run_tests(tests, generate, dry_run, jobs, debug) :
     196def run_tests(tests, generate, dry_run, jobs) :
    199197        # clean the sandbox from previous commands
    200198        sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run)
     
    209207        pool = Pool(jobs)
    210208        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)
    212210        except KeyboardInterrupt:
    213211                pool.terminate()
     
    224222        return 0
    225223
    226 def 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 
    235224################################################################################
    236225#               main loop
     
    238227# create a parser with the arguments for the tests script
    239228parser = 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')
    241229parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true')
    242230parser.add_argument('--list', help='List all test available', action='store_true')
     
    308296        sys.exit(1)
    309297
    310 print('Running (%s) on %i cores' % ("debug" if options.debug else "no debug", options.jobs))
     298print('Running on %i cores' % options.jobs)
    311299make_cmd = "make" if make_flags else ("make -j%i" % options.jobs)
    312300
     
    317305else :
    318306        # 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.