Changeset 330d933 for tests


Ignore:
Timestamp:
Aug 25, 2019, 8:48:51 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2aab69b, 5a43ab8
Parents:
f9bf142 (diff), bbb1b35 (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:software/cfa/cfa-cc

Location:
tests
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/gccExtensions.x64.txt

    rf9bf142 r330d933  
    291291    signed int _X2m2A0A0i_2[((unsigned long int )10)][((unsigned long int )10)];
    292292    signed int _X2m3A0A0i_2[((unsigned long int )10)][((unsigned long int )10)];
    293     {
    294         ((void)(_X12_retval_maini_1=0) /* ?{} */);
    295     }
    296 
    297     return _X12_retval_maini_1;
     293    void _X4f128Fv_n__2(__int128 _X1in_2);
     294    void _X4f128Fv_o__2(unsigned __int128 __anonymous_object0);
     295    __int128 _X6i128_0n_2;
     296    {
     297        ((void)_X4f128Fv_n__2(_X6i128_0n_2));
     298    }
     299
     300    unsigned __int128 _X6i128_1o_2;
     301    {
     302        ((void)_X4f128Fv_o__2(_X6i128_1o_2));
     303    }
     304
     305    __int128 _X6i128_2n_2;
     306    {
     307        ((void)_X4f128Fv_n__2(_X6i128_2n_2));
     308    }
     309
     310    unsigned __int128 _X6i128_3o_2;
     311    {
     312        ((void)_X4f128Fv_o__2(_X6i128_3o_2));
     313    }
     314
    298315    {
    299316        ((void)(_X12_retval_maini_1=0) /* ?{} */);
  • tests/.expect/gccExtensions.x86.txt

    rf9bf142 r330d933  
    296296
    297297    return _X12_retval_maini_1;
    298     {
    299         ((void)(_X12_retval_maini_1=0) /* ?{} */);
    300     }
    301 
    302     return _X12_retval_maini_1;
    303298}
    304299static inline int invoke_main(int argc, char* argv[], char* envp[]) { (void)argc; (void)argv; (void)envp; return _X4mainFi_iPPKc__1((signed int )argc, (const char **)argv); }
  • tests/Makefile.am

    rf9bf142 r330d933  
    2222debug=yes
    2323installed=no
     24archiveerrors=
    2425
    2526INSTALL_FLAGS=-in-tree
     
    5657#----------------------------------------------------------------------------------------------------------------
    5758all-local :
    58         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
     59        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    5960
    6061all-tests :
    61         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     62        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    6263
    6364clean-local :
  • tests/Makefile.in

    rf9bf142 r330d933  
    235235CYGPATH_W = @CYGPATH_W@
    236236DEFS = @DEFS@
     237DEMANGLER = @DEMANGLER@
    237238DEPDIR = @DEPDIR@
    238239DLLTOOL = @DLLTOOL@
     
    260261LIBCFA_TARGET_DIRS = @LIBCFA_TARGET_DIRS@
    261262LIBCFA_TARGET_MAKEFILES = @LIBCFA_TARGET_MAKEFILES@
     263LIBDEMANGLE = @LIBDEMANGLE@
    262264LIBOBJS = @LIBOBJS@
    263265LIBS = @LIBS@
     
    375377debug = yes
    376378installed = no
     379archiveerrors =
    377380INSTALL_FLAGS = -in-tree
    378381DEBUG_FLAGS = -debug -O0
     
    768771#----------------------------------------------------------------------------------------------------------------
    769772all-local :
    770         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} ${quick_test}
     773        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} ${quick_test}
    771774
    772775all-tests :
    773         @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     776        @+${TEST_PY} --debug=${debug}  --install=${installed} --archive-errors=${archiveerrors} ${concurrent} ${timeouts} --all # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    774777
    775778clean-local :
  • tests/gccExtensions.cfa

    rf9bf142 r330d933  
    1010// Created On       : Sun Aug 14 17:28:17 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Nov  6 17:54:20 2018
    13 // Update Count     : 11
     12// Last Modified On : Mon Aug  5 18:04:37 2019
     13// Update Count     : 28
    1414//
    1515
     
    5050
    5151  L1: L2:
    52         asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5"
    53                            : /* No outputs. */
    54                            : "r"(src), "r"(&dst)
    55                            : "r5", "memory"
    56                            : L1, L2 );
     52        asm goto ( "frob %%r5, %1; jc %l[L1]; mov (%2), %%r5"
     53                           : /* No outputs. */
     54                           : "r"(src), "r"(&dst)
     55                           : "r5", "memory"
     56                           : L1, L2 );
    5757
    5858        // alternative type/qualifer names
     
    110110        struct __attribute(()) s4 { int i; } x2, y2 __attribute(());
    111111
    112         int m1 [10] __attribute(());
    113         int m2 [10][10] __attribute(());
     112        int m1[10] __attribute(());
     113        int m2[10][10] __attribute(());
    114114        int __attribute(()) m3 [10][10];
    115115//      int ( __attribute(()) m4 [10] )[10];
    116116
    117         return 0;
     117        // int128
     118
     119#if defined( __SIZEOF_INT128__ )
     120        void f128( __int128 i );
     121        void f128( __uint128_t );
     122
     123        __int128 i128_0;
     124        f128( i128_0 );
     125        unsigned __int128 i128_1;
     126        f128( i128_1 );
     127        __int128_t i128_2;
     128        f128( i128_2 );
     129        __uint128_t i128_3;
     130        f128( i128_3 );
     131#endif
    118132}
    119133
  • tests/pybin/settings.py

    rf9bf142 r330d933  
    44from . import tools
    55
     6global original_path
     7
    68try :
     9        original_path = os.getcwd()
    710        testpath = os.path.dirname(os.path.abspath(os.path.join(os.getcwd(), sys.argv[0])))
    811        sys.path.append(testpath)
     
    1922class Architecture:
    2023        KnownArchitectures = {
    21                 'x64'                   : 'x64',
    22                 'x86-64'                : 'x64',
    23                 'x86_64'                : 'x64',
    24                 'aarch64'               : 'x64',
    25                 'x86'                   : 'x86',
     24                'x64'           : 'x64',
     25                'x86-64'        : 'x64',
     26                'x86_64'        : 'x64',
     27                'x86'           : 'x86',
     28                'aarch64'       : 'arm',
    2629                'i386'          : 'x86',
    2730                'i486'          : 'x86',
    2831                'i686'          : 'x86',
    2932                'Intel 80386'   : 'x86',
    30                 'arm'                   : 'arm',
    31                 'ARM'                   : 'arm',
     33                'arm'           : 'arm',
     34                'ARM'           : 'arm',
    3235        }
    3336
     
    113116        global timeout
    114117        global output_width
     118        global archive
    115119
    116120        dry_run      = options.dry_run
     
    122126        timeout      = Timeouts(options.timeout, options.global_timeout)
    123127        output_width = 24
     128        archive      = os.path.abspath(os.path.join(original_path, options.archive_errors)) if options.archive_errors else None
    124129
    125130
  • tests/pybin/tools.py

    rf9bf142 r330d933  
    22import argparse
    33import contextlib
     4import datetime
    45import fileinput
    56import multiprocessing
     
    273274################################################################################
    274275
     276def pretty_now():
     277        ts = time.time()
     278        print(ts, file=sys.stderr)
     279        return datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d_%H:%M:%S')
     280
    275281# check if arguments is yes or no
    276282def yes_no(string):
     
    304310        return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output=subprocess.PIPE)
    305311
     312def core_archive(dst, name, exe):
     313        # Get the files to copy
     314        core = os.path.join(os.getcwd(), "core" )
     315
     316        # Uncomment if we want timestamps on coredumps
     317        # dst  = os.path.join(dst, "%s_%s" % (name, pretty_now()))
     318
     319        # make a directory for this test
     320        mkdir(os.path.join(dst, "dir"))
     321
     322        # moves the files
     323        mv( core, os.path.join(dst, "core" ) )
     324        mv( exe , os.path.join(dst, name   ) )
     325
     326        # return explanatory test
     327        return "Archiving %s (executable and core) to %s" % (os.path.relpath(exe, settings.BUILDDIR), os.path.relpath(dst, settings.original_path))
     328
    306329class Timed:
    307330    def __enter__(self):
  • tests/test.py

    rf9bf142 r330d933  
    9191        parser.add_argument('--all', help='Run all test available', action='store_true')
    9292        parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true')
     93        parser.add_argument('--archive-errors', help='If called with a valid path, on test crashes the test script will copy the core dump and the executable to the specified path.', type=str, default='')
    9394        parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int)
    9495        parser.add_argument('--list-comp', help='List all valide arguments', action='store_true')
     
    179180                        error = error + info if error else info
    180181
     182                        if settings.archive:
     183                                error = error + '\n' + core_archive(settings.archive, test.target(), exe_file)
     184
    181185
    182186
     
    295299        # users may want to simply list the tests
    296300        if options.list_comp :
    297                 print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --install --timeout --global-timeout -j --jobs ", end='')
     301                print("-h --help --debug --dry-run --list --arch --all --regenerate-expected --archive-errors --install --timeout --global-timeout -j --jobs ", end='')
    298302                print(" ".join(map(lambda t: "%s" % (t.target()), tests)))
    299303
Note: See TracChangeset for help on using the changeset viewer.