Changeset 32a2a99 for src/tests


Ignore:
Timestamp:
Aug 30, 2016, 4:25:55 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
90e2334, fa463f1
Parents:
a2a8d2a6 (diff), ced2e989 (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 plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

Location:
src/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/tests/.expect/declarationErrors.txt

    ra2a8d2a6 r32a2a99  
    11CFA Version 1.0.0 (debug)
    2 Error: invalid combination of storage classes in declaration of x9: static volatile const short int
     2Error: invalid combination of storage classes in declaration of x9: static const volatile short int
    33
    4 Error: invalid combination of storage classes in declaration of x18: static const volatile instance of struct __anonymous0
     4Error: invalid combination of storage classes in declaration of x18: static const volatile instance of const volatile struct __anonymous0
    55  with members
    66   with body
    77
    88
    9 Error: invalid combination of storage classes in declaration of x19: static const volatile volatile instance of struct __anonymous1
     9Error: duplicate qualifier volatile in declaration of x19: static const volatile instance of const volatile struct __anonymous1
    1010  with members
    1111   with body
    1212
    1313
    14 Error: invalid combination of storage classes in declaration of x28: static volatile const instance of type Int
     14Error: invalid combination of storage classes in declaration of x28: static const volatile instance of type Int
     15
     16Error: duplicate qualifier const in declaration of f01: static inline function
     17  with no parameters
     18  returning const volatile int
     19
     20
     21Error: duplicate qualifier volatile in declaration of f02: static inline function
     22  with no parameters
     23  returning const volatile int
     24
     25
     26Error: duplicate qualifier const in declaration of f03: static inline function
     27  with no parameters
     28  returning const volatile int
     29
     30
     31Error: duplicate qualifier volatile in declaration of f04: static inline function
     32  with no parameters
     33  returning const volatile int
     34
     35
     36Error: duplicate qualifier const in declaration of f05: static inline function
     37  with no parameters
     38  returning const volatile int
     39
     40
     41Error: duplicate qualifier volatile in declaration of f06: static inline function
     42  with no parameters
     43  returning const volatile int
     44
     45
     46Error: duplicate qualifier const in declaration of f07: static inline function
     47  with no parameters
     48  returning const volatile int
     49
     50
     51Error: duplicate qualifier const, volatile in declaration of f08: static inline function
     52  with no parameters
     53  returning const volatile int
     54
     55
     56Error: duplicate qualifier const, volatile in declaration of f09: static inline function
     57  with no parameters
     58  returning const volatile int
     59
     60
     61Error: duplicate qualifier const, volatile in declaration of f09: static inline function
     62  with no parameters
     63  returning const volatile int
     64
    1565
    1666make: *** [declarationErrors] Error 1
  • TabularUnified src/tests/declarationErrors.c

    ra2a8d2a6 r32a2a99  
    1010// Created On       : Wed Aug 17 08:23:43 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Aug 17 08:27:15 2016
    13 // Update Count     : 2
     12// Last Modified On : Thu Aug 25 18:16:40 2016
     13// Update Count     : 5
    1414//
    1515
    16 const short static int volatile x4;
    17 const static volatile short int x4;
    1816static short int volatile static const x9;                              // duplicate static
    1917struct { int i; } const static volatile static x18;             // duplicate static
     
    2927volatile static const volatile inline int f06();                // duplicate volatile
    3028const static const volatile int inline f07();                   // duplicate const
    31 volatile static const int inline volatile f08();                // duplicate volatile
     29volatile static const int inline const volatile f08();          // duplicate volatile
     30
     31volatile static const int inline const volatile f09();          // duplicate volatile
     32volatile static const int inline const volatile f09();          // duplicate volatile
    3233
    3334//Dummy main
  • TabularUnified src/tests/test.py

    ra2a8d2a6 r32a2a99  
    22from __future__ import print_function
    33
     4from functools import partial
     5from multiprocessing import Pool
    46from os import listdir, environ
    57from os.path import isfile, join, splitext
     
    102104#               running test functions
    103105################################################################################
    104 def run_test_instance(test, generate, dry_run):
     106def run_single_test(test, generate, dry_run):
    105107
    106108        # find the output file based on the test name and options flag
     
    163165        return retcode, error
    164166
     167def 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
    165195# run the given list of tests with the given parameters
    166196def run_tests(tests, generate, dry_run, jobs) :
     
    174204                print( "Regenerate tests for: " )
    175205
    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)
    207214
    208215        #clean the workspace
    209216        sh("%s clean > /dev/null 2>&1" % make_cmd, dry_run)
    210217
    211         return 1 if failed else 0
     218        for failed in results:
     219                if failed :
     220                        return 1
     221
     222        return 0
    212223
    213224################################################################################
     
    279290
    280291# 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.jobs
     292options.jobs = int(make_max_jobs) if make_max_jobs else (options.jobs if options.jobs else 1)
    282293if options.jobs <= 0 :
    283294        print('ERROR: Invalid number of jobs', file=sys.stderr)
    284295        sys.exit(1)
    285296
     297print('Running on %i cores' % options.jobs)
     298
    286299# users may want to simply list the tests
    287300if options.list :
Note: See TracChangeset for help on using the changeset viewer.