Subversion Repositories DevTools

Rev

Rev 5695 | Rev 5816 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5695 Rev 5708
Line 1... Line 1...
1
# -*- mode: perl; tabs: 8; indent-width: 4; show-tabs: yes; -*-
1
##############################################################################
2
# Copyright (C) 1998-2008 ERG Transit Systems, All rights reserved
2
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
3
#
3
#
4
# Module name   : makelib.pl2
4
# Module name   : makelib.pl2
5
# Module type   : Makefile system
5
# Module type   : Makefile system
6
#
6
#
7
# Description:
7
# Description:
Line 9351... Line 9351...
9351
    foreach my $pEntry ( @TESTS_TO_RUN )
9351
    foreach my $pEntry ( @TESTS_TO_RUN )
9352
    {                                           # Foreach test
9352
    {                                           # Foreach test
9353
        $idx++;
9353
        $idx++;
9354
        $pEntry->{'index'} = $idx;
9354
        $pEntry->{'index'} = $idx;
9355
        $pEntry->{'test_name'} = "run_test_$idx";
9355
        $pEntry->{'test_name'} = "run_test_$idx";
-
 
9356
        $pEntry->{'echoname'} = $pEntry->{'utfname'} || '';  
9356
        $pEntry->{'utfname'} = $pEntry->{'test_name'} unless defined $pEntry->{'utfname'};  
9357
        $pEntry->{'utfname'} = $pEntry->{'test_name'} unless defined $pEntry->{'utfname'};  
9357
 
9358
 
9358
        #
9359
        #
9359
        #   If the test is being run within a 'FrameWork' then the underlying
9360
        #   If the test is being run within a 'FrameWork' then the underlying
9360
        #   toolset must instantiate the frame work.
9361
        #   toolset must instantiate the frame work.
Line 9384... Line 9385...
9384
        #   Determine the maximum time that the automated test should run
9385
        #   Determine the maximum time that the automated test should run
9385
        #       Default is 30 minutes
9386
        #       Default is 30 minutes
9386
        #   Non-auto tests are not time limited
9387
        #   Non-auto tests are not time limited
9387
        #       
9388
        #       
9388
        my $timeout = '';
9389
        my $timeout = '';
-
 
9390
 
-
 
9391
        #
-
 
9392
        #   NOTE: Time out of unit tests has been disabled under Windows pending windows 
-
 
9393
        #         solution that works on Windows XP, Vista, 7, 8, 10, Server 2003 and server 2012.
-
 
9394
        #
9389
        if ($pEntry->{'auto'})
9395
        if ($ENV{'GBE_UNIX'})
9390
        {
9396
        {
-
 
9397
            if ($pEntry->{'auto'})
-
 
9398
            {
9391
            $timeout = 'timeout -Time:' . ($pEntry->{'maxtime'} || '30m') . ' ';
9399
                $timeout = 'timeout -Time:' . ($pEntry->{'maxtime'} || '30m') . ' ';
-
 
9400
            }
9392
        }
9401
        }
9393
        
9402
        
9394
        my $me = MakeEntry::New( *MAKEFILE, $test_name, '--Phony' );
9403
        my $me = MakeEntry::New( *MAKEFILE, $test_name, '--Phony' );
9395
 
9404
 
9396
        #
9405
        #
Line 9405... Line 9414...
9405
        $me->AddDependancy( $tprog ) if $pEntry->{'copyprog'};
9414
        $me->AddDependancy( $tprog ) if $pEntry->{'copyprog'};
9406
        $me->AddDependancy( @{ $pEntry->{'copyin' } } );
9415
        $me->AddDependancy( @{ $pEntry->{'copyin' } } );
9407
        $me->AddDependancy( map { $tdir . '/' . StripDir($_) } @{ $pEntry->{'copyonce' } } );
9416
        $me->AddDependancy( map { $tdir . '/' . StripDir($_) } @{ $pEntry->{'copyonce' } } );
9408
        $me->AddDependancy( @{ $pEntry->{'preq'} } );
9417
        $me->AddDependancy( @{ $pEntry->{'preq'} } );
9409
        $me->RecipePrefix ('$(XX_PRE)');
9418
        $me->RecipePrefix ('$(XX_PRE)');
-
 
9419
        $me->RecipeWrapper( $timeout . 'sh -c \'', '\'') if $timeout;
9410
        $me->RecipeComment( "------ Running test [$idx] ..." );
9420
        $me->RecipeComment( "------ Running test [$idx] $pEntry->{'echoname'} ..." );
9411
 
9421
 
9412
        #
9422
        #
9413
        #   Create package utfResults directory
9423
        #   Create package utfResults directory
9414
        #       Simplify use of the file
9424
        #       Simplify use of the file
9415
        #
9425
        #
Line 9446... Line 9456...
9446
        $me->AddShellRecipe ( "cd $tdir" );
9456
        $me->AddShellRecipe ( "cd $tdir" );
9447
        $me->AddShellRecipe ( ["GBE_TYPE=\$(GBE_TYPE)",
9457
        $me->AddShellRecipe ( ["GBE_TYPE=\$(GBE_TYPE)",
9448
                               "GBE_HOST=\$(GBE_HOST)",
9458
                               "GBE_HOST=\$(GBE_HOST)",
9449
                               "GBE_ROOT=\$(GBE_ROOT_ABS)",
9459
                               "GBE_ROOT=\$(GBE_ROOT_ABS)",
9450
                               "PATH=.\\$::ScmPathSep\$(BINDIR_LOCAL_PATH)\\$::ScmPathSep\$\$PATH",
9460
                               "PATH=.\\$::ScmPathSep\$(BINDIR_LOCAL_PATH)\\$::ScmPathSep\$\$PATH",
9451
                               $timeout . $pEntry->{'command'},
9461
                               $pEntry->{'command'},
9452
                               @{$pEntry->{'args'}},
9462
                               @{$pEntry->{'args'}},
9453
                               ] , 
9463
                               ] , 
9454
                               'echo $$? > utf.$${GBE_UTFUID}.rc' );
9464
                               'echo $$? > utf.$${GBE_UTFUID}.rc' );
9455
 
9465
 
9456
        #
9466
        #