Changeset 74ec742 for tests


Ignore:
Timestamp:
May 20, 2022, 10:36:45 AM (4 years ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
25fa20a
Parents:
29d8c02 (diff), 7831e8fb (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
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • tests/.expect/forall.txt

    r29d8c02 r74ec742  
    1 forall.cfa:242:25: warning: Compiled
     1forall.cfa:244:25: warning: Compiled
  • tests/forall.cfa

    r29d8c02 r74ec742  
    1 // 
     1//
    22// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
    33//
    44// The contents of this file are covered under the licence agreement in the
    55// file "LICENCE" distributed with Cforall.
    6 // 
    7 // forall.cfa -- 
    8 // 
     6//
     7// forall.cfa --
     8//
    99// Author           : Peter A. Buhr
    1010// Created On       : Wed May  9 08:48:15 2018
     
    1212// Last Modified On : Sat Jun  5 10:06:08 2021
    1313// Update Count     : 36
    14 // 
     14//
    1515
    1616void g1() {
     
    4545}
    4646
    47 typedef forall ( T ) int (* f)( int );
     47// commented this out since it is not clearly meaningful
     48// and not really representable in the ast
     49// typedef forall ( T ) int (* f)( int );
    4850
    4951forall( T )
     
    170172}
    171173
    172 forall( T | { T ?+?( T, T ); } ) forall( S | { T ?+?( T, S ); } ) 
     174forall( T | { T ?+?( T, T ); } ) forall( S | { T ?+?( T, S ); } )
    173175struct XW { T t; };
    174176XW(int,int) xww;
  • tests/include/.expect/includes.nast.txt

    r29d8c02 r74ec742  
    1 include/includes.cfa:153:25: warning: Compiled
     1include/includes.cfa:169:25: warning: Compiled
  • tests/include/includes.cfa

    r29d8c02 r74ec742  
    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 : Tue May 10 16:36:44 2022
     13// Update Count     : 776
    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>
    4549#include <expat.h>
     
    5054#include <fmtmsg.h>
    5155#include <fnmatch.h>
    52 //#include <form.h>                                                                             // may not be installed, comes with ncurses
     56#if __has_include( "form.h" )
     57#include <form.h>                                                                               // may not be installed, comes with ncurses
     58#endif
    5359#include <fstab.h>
    5460#include <fts.h>
     
    7884#include <mcheck.h>
    7985#include <memory.h>
    80 //#include <menu.h>                                                                             // may not be installed, comes with ncurses
     86#if __has_include( "menu.h" )
     87#include <menu.h>                                                                               // may not be installed, comes with ncurses
     88#endif
    8189#include <mntent.h>
    8290#include <monetary.h>
    8391#include <mqueue.h>
    84 //#include <ncurses_dll.h>                                                              // may not be installed, comes with ncurses
     92#if __has_include( "ncurses_dll.h" )
     93#include <ncurses_dll.h>                                                                // may not be installed, comes with ncurses
     94#endif
    8595#include <netdb.h>
    8696#include <nl_types.h>
    8797#include <nss.h>
    8898#include <obstack.h>
    89 //#include <panel.h>                                                                            // may not be installed, comes with ncurses
     99#if __has_include( "panel.h" )
     100#include <panel.h>                                                                              // may not be installed, comes with ncurses
     101#endif
    90102#include <paths.h>
    91103#include <poll.h>
     
    118130#include <syslog.h>
    119131#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
     132#if __has_include( "term.h" )
     133#include <term.h>                                                                               // may not be installed, comes with ncurses
     134#include <termcap.h>                                                                    // may not be installed, comes with ncurses
     135#endif
    122136#include <termio.h>
    123137#include <termios.h>
     
    131145#include <ucontext.h>
    132146#include <ulimit.h>
    133 //#include <unctrl.h>                                                                           // may not be installed, comes with ncurses
     147#if __has_include( "unctrl.h" )
     148#include <unctrl.h>                                                                             // may not be installed, comes with ncurses
     149#endif
    134150#include <unistd.h>
    135151#include <utime.h>
  • tests/pybin/settings.py

    r29d8c02 r74ec742  
    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

    r29d8c02 r74ec742  
    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/test.py

    r29d8c02 r74ec742  
    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)
  • tests/unified_locking/.expect/locks.txt

    r29d8c02 r74ec742  
    2323Start Test 12: locked condition variable wait/notify with front()
    2424Done Test 12
     25Start Test 13: fast block lock and fast cond var single wait/notify
     26Done Test 13
  • tests/unified_locking/locks.cfa

    r29d8c02 r74ec742  
    1818condition_variable( linear_backoff_then_block_lock ) c_l;
    1919
     20fast_block_lock f;
     21fast_cond_var( fast_block_lock ) f_c_f;
     22
    2023thread T_C_M_WS1 {};
    2124
     
    99102                }
    100103                unlock(l);
     104        }
     105}
     106
     107thread T_F_C_F_WS1 {};
     108
     109void main( T_F_C_F_WS1 & this ) {
     110        for (unsigned int i = 0; i < num_times; i++) {
     111                lock(f);
     112                if(empty(f_c_f) && i != num_times - 1) {
     113                        wait(f_c_f,f);
     114                }else{
     115                        notify_one(f_c_f);
     116                        unlock(f);
     117                }
    101118        }
    102119}
     
    322339        }
    323340        printf("Done Test 12\n");
    324 }
     341
     342        printf("Start Test 13: fast block lock and fast cond var single wait/notify\n");
     343        {
     344                T_F_C_F_WS1 t1[2];
     345        }
     346        printf("Done Test 13\n");
     347       
     348}
Note: See TracChangeset for help on using the changeset viewer.