Changeset 90a8125 for tests


Ignore:
Timestamp:
Jun 3, 2022, 3:10:01 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
7affcda
Parents:
bf0263c (diff), fc134a48 (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:
5 added
14 edited

Legend:

Unmodified
Added
Removed
  • tests/.expect/attributes.nast.x64.txt

    rbf0263c r90a8125  
    13391339        }
    13401340
    1341         {
    1342             ((void)(_X4_retM12__anonymous4_2=(*_X4_dstM12__anonymous4_2)) /* ?{} */);
    1343         }
    1344 
    1345         return _X4_retM12__anonymous4_2;
     1341        return (*_X4_dstM12__anonymous4_2);
    13461342    }
    13471343    {
  • tests/.expect/attributes.nast.x86.txt

    rbf0263c r90a8125  
    13391339        }
    13401340
    1341         {
    1342             ((void)(_X4_retM12__anonymous4_2=(*_X4_dstM12__anonymous4_2)) /* ?{} */);
    1343         }
    1344 
    1345         return _X4_retM12__anonymous4_2;
     1341        return (*_X4_dstM12__anonymous4_2);
    13461342    }
    13471343    {
  • tests/.expect/attributes.oast.x64.txt

    rbf0263c r90a8125  
    13391339        }
    13401340
    1341         {
    1342             ((void)(_X4_retM12__anonymous4_2=(*_X4_dstM12__anonymous4_2)) /* ?{} */);
    1343         }
    1344 
    1345         return _X4_retM12__anonymous4_2;
     1341        return (*_X4_dstM12__anonymous4_2);
    13461342    }
    13471343    {
  • tests/.expect/attributes.oast.x86.txt

    rbf0263c r90a8125  
    13391339        }
    13401340
    1341         {
    1342             ((void)(_X4_retM12__anonymous4_2=(*_X4_dstM12__anonymous4_2)) /* ?{} */);
    1343         }
    1344 
    13451341        return _X4_retM12__anonymous4_2;
    13461342    }
  • tests/.expect/quasiKeyword.txt

    rbf0263c r90a8125  
    1 quasiKeyword.cfa:54:25: warning: Compiled
     1quasiKeyword.cfa:52:25: warning: Compiled
  • tests/exceptions/defaults.cfa

    rbf0263c r90a8125  
    22
    33#include <string.h>
    4 #include <exception.hfa>
    54
    65exception log_message {
     
    87};
    98
    10 _EHM_DEFINE_COPY(log_message, )
     9// Manually define the virtual table and helper functions.
     10void copy(log_message * this, log_message * that) {
     11        *this = *that;
     12}
     13
    1114const char * msg(log_message * this) {
    1215        return this->msg;
    1316}
    14 _EHM_VIRTUAL_TABLE(log_message, , log_vt);
     17
     18const struct log_message_vtable log_vt @= {
     19        .__cfavir_typeid : &__cfatid_log_message,
     20        .size : sizeof(struct log_message),
     21        .copy : copy,
     22        .^?{} : ^?{},
     23        .msg : msg,
     24};
    1525
    1626// Logging messages don't have to be handled.
  • tests/include/.expect/includes.nast.txt

    rbf0263c r90a8125  
    1 include/includes.cfa:153:25: warning: Compiled
     1include/includes.cfa:173:25: warning: Compiled
  • tests/include/includes.cfa

    rbf0263c r90a8125  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  3 22:06:07 2022
    13 // Update Count     : 774
     12// Last Modified On : Sun May 22 08:27:20 2022
     13// Update Count     : 779
    1414//
    1515
     
    3232#include <crypt.h>
    3333#include <ctype.h>
    34 //#include <curses.h>                                                                           // may not be installed
     34#if __has_include( "curses.h" )
     35#include <curses.h>                                                                             // may not be installed
     36#endif
    3537#include <dirent.h>
    3638#include <dlfcn.h>
     
    4143#include <errno.h>
    4244#include <error.h>
    43 //#include <eti.h>                                                                              // may not be installed, comes with ncurses
     45#if __has_include( "eti.h" )
     46#include <eti.h>                                                                                // may not be installed, comes with ncurses
     47#endif
    4448#include <execinfo.h>
    45 #include <expat.h>
     49#if __has_include( "expat.h" )
     50#include <expat.h>                                                                              // may not be installed
    4651#include <expat_external.h>
     52#endif
    4753#include <fcntl.h>
    4854#include <features.h>
     
    5056#include <fmtmsg.h>
    5157#include <fnmatch.h>
    52 //#include <form.h>                                                                             // may not be installed, comes with ncurses
     58#if __has_include( "form.h" )
     59#include <form.h>                                                                               // may not be installed, comes with ncurses
     60#endif
    5361#include <fstab.h>
    5462#include <fts.h>
     
    7381//#include <link.h>                                                                             // CFA bug #240 nested anonymous enum fails
    7482#include <locale.h>
    75 #include <ltdl.h>
     83#if __has_include( "ltdl.h" )
     84#include <ltdl.h>                                                                               // may not be installed
     85#endif
    7686//#include <malloc.h>                                                                   // cannot include in extern "C" because of CFA #include_next
    7787#include <math.h>
    7888#include <mcheck.h>
    7989#include <memory.h>
    80 //#include <menu.h>                                                                             // may not be installed, comes with ncurses
     90#if __has_include( "menu.h" )
     91#include <menu.h>                                                                               // may not be installed, comes with ncurses
     92#endif
    8193#include <mntent.h>
    8294#include <monetary.h>
    8395#include <mqueue.h>
    84 //#include <ncurses_dll.h>                                                              // may not be installed, comes with ncurses
     96#if __has_include( "ncurses_dll.h" )
     97#include <ncurses_dll.h>                                                                // may not be installed, comes with ncurses
     98#endif
    8599#include <netdb.h>
    86100#include <nl_types.h>
    87101#include <nss.h>
    88102#include <obstack.h>
    89 //#include <panel.h>                                                                            // may not be installed, comes with ncurses
     103#if __has_include( "panel.h" )
     104#include <panel.h>                                                                              // may not be installed, comes with ncurses
     105#endif
    90106#include <paths.h>
    91107#include <poll.h>
     
    118134#include <syslog.h>
    119135#include <tar.h>
    120 //#include <term.h>                                                                             // may not be installed, comes with ncurses
    121 //#include <termcap.h>                                                                  // may not be installed, comes with ncurses
     136#if __has_include( "term.h" )
     137#include <term.h>                                                                               // may not be installed, comes with ncurses
     138#include <termcap.h>                                                                    // may not be installed, comes with ncurses
     139#endif
    122140#include <termio.h>
    123141#include <termios.h>
     
    131149#include <ucontext.h>
    132150#include <ulimit.h>
    133 //#include <unctrl.h>                                                                           // may not be installed, comes with ncurses
     151#if __has_include( "unctrl.h" )
     152#include <unctrl.h>                                                                             // may not be installed, comes with ncurses
     153#endif
    134154#include <unistd.h>
    135155#include <utime.h>
  • tests/linking/exception-nothreads.cfa

    rbf0263c r90a8125  
    1515
    1616#include <stdlib.hfa>
    17 #include <exception.hfa>
    1817
    19 EHM_EXCEPTION(ping)();
    20 EHM_VIRTUAL_TABLE(ping, ping_vt);
     18exception ping {};
     19vtable(ping) ping_vt;
    2120
    2221int main(void) {
  • tests/linking/exception-withthreads.cfa

    rbf0263c r90a8125  
    1515
    1616#include <stdlib.hfa>
    17 #include <exception.hfa>
    1817#include "../exceptions/with-threads.hfa"
    1918
    20 EHM_EXCEPTION(ping)();
    21 EHM_VIRTUAL_TABLE(ping, ping_vt);
     19exception ping {};
     20vtable(ping) ping_vt;
    2221
    2322int main(void) {
  • tests/pybin/settings.py

    rbf0263c r90a8125  
    201201        global output_width
    202202        output_width = max(map(lambda t: len(t.target()), tests))
     203        # 35 is the maximum width of the name field before we get line wrapping.
     204        output_width = min(output_width, 35)
  • tests/pybin/test_run.py

    rbf0263c r90a8125  
    4343                return os.path.normpath( os.path.join(settings.BUILDDIR, self.path, self.name) )
    4444
     45        def format_target(self, width):
     46                target = self.target()
     47                length = len(target)
     48                if length < width:
     49                        return '{0:{width}}'.format(target, width=width)
     50                elif length == width:
     51                        return target
     52                else:
     53                        return '...' + target[3-width:]
     54
    4555        @staticmethod
    4656        def valid_name(name):
  • tests/quasiKeyword.cfa

    rbf0263c r90a8125  
    44// quasiKeyword.cfa -- test that quasi-keywords can be used for variable and functions names, as well as keywords in
    55//                                         control structures.
    6 // 
     6//
    77// Author           : Peter A. Buhr
    88// Created On       : Wed Feb 17 10:33:49 2021
     
    1010// Last Modified On : Sat Jun  5 10:07:59 2021
    1111// Update Count     : 8
    12 // 
     12//
    1313
    14 #include <exception.hfa>
    15 
    16 EHM_EXCEPTION( E )();
     14exception E {};
    1715
    1816void catch( int i ) {}
     
    4947                } fixup ( E * ) {
    5048                } finally {
    51                 } 
     49                }
    5250        else catch = 3;
    5351
  • tests/test.py

    rbf0263c r90a8125  
    132132        parser.add_argument('--install', help='Run all tests based on installed binaries or tree binaries', type=comma_separated(yes_no), default='no')
    133133        parser.add_argument('--continue', help='When multiple specifications are passed (debug/install/arch), sets whether or not to continue if the last specification failed', type=yes_no, default='yes', dest='continue_')
    134         parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=120)
     134        parser.add_argument('--timeout', help='Maximum duration in seconds after a single test is considered to have timed out', type=int, default=180)
    135135        parser.add_argument('--global-timeout', help='Maximum cumulative duration in seconds after the ALL tests are considered to have timed out', type=int, default=7200)
    136136        parser.add_argument('--timeout-with-gdb', help='Instead of killing the command when it times out, orphan it and print process id to allow gdb to attach', type=yes_no, default="no")
     
    252252        try :
    253253                # print formated name
    254                 name_txt = '{0:{width}}  '.format(t.target(), width=settings.output_width)
     254                name_txt = t.format_target(width=settings.output_width) + '  '
    255255
    256256                retcode, error, duration = run_single_test(t)
Note: See TracChangeset for help on using the changeset viewer.