Subversion Repositories DevTools

Rev

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

Rev 5672 Rev 5695
Line 4762... Line 4762...
4762
#                                       --Unit              - Same and --Auto
4762
#                                       --Unit              - Same and --Auto
4763
#                                       --UtfFormat=nnn     - Specifies Automated Unit Test, 
4763
#                                       --UtfFormat=nnn     - Specifies Automated Unit Test, 
4764
#                                                             results post processed with formatter
4764
#                                                             results post processed with formatter
4765
#                                       --UtfArg=nnn        - Argument passed into the UTF formatter    
4765
#                                       --UtfArg=nnn        - Argument passed into the UTF formatter    
4766
#                                       --Name=nnn          - Test Name.
4766
#                                       --Name=nnn          - Test Name.
4767
#                                       --CopyIn=file       - A file to be copied into
4767
#                                       --CopyIn=file       - A file to be copied into the test directory.
4768
#                                                             The test directory.
4768
#                                       --MaxTime=fff.ff[smhd] - Max Test Time. Default 30m
4769
#
4769
#
4770
#                                     Non Options are passed to the test program.
4770
#                                     Non Options are passed to the test program.
4771
#                                     --PackageBase(xxx)    - Base of package
4771
#                                     --PackageBase(xxx)    - Base of package
4772
#                                     --PackageInfo(xxx)    - Package information
4772
#                                     --PackageInfo(xxx)    - Package information
4773
#                                     --File(xxx)           - Resolved name of file
4773
#                                     --File(xxx)           - Resolved name of file
Line 4791... Line 4791...
4791
    my @copy = ();
4791
    my @copy = ();
4792
    my $auto;
4792
    my $auto;
4793
    my $utfFormat;
4793
    my $utfFormat;
4794
    my @utfArgs;
4794
    my @utfArgs;
4795
    my $utfName;
4795
    my $utfName;
-
 
4796
    my $maxTime;
4796
 
4797
 
4797
    return if ( ! ActivePlatform($platforms) );
4798
    return if ( ! ActivePlatform($platforms) );
4798
 
4799
 
4799
    #
4800
    #
4800
    #   Scan @elements and extract useful information
4801
    #   Scan @elements and extract useful information
Line 4821... Line 4822...
4821
            $utfFormat = $1;
4822
            $utfFormat = $1;
4822
 
4823
 
4823
        } elsif ( m/^--UtfArg=(.*)/) {
4824
        } elsif ( m/^--UtfArg=(.*)/) {
4824
            push @utfArgs, $1;
4825
            push @utfArgs, $1;
4825
 
4826
 
-
 
4827
        } elsif ( m/^--MaxTime=(.*)/) {
-
 
4828
            $maxTime = $1;
-
 
4829
            unless ($maxTime =~ m~^[0-9]*\.?[0-9]+[smhd]?$~) {
-
 
4830
                Error("MaxTime invalid: $maxTime");
-
 
4831
            }
-
 
4832
 
4826
        } elsif ( m/^--CopyIn=(.*)/ ) {
4833
        } elsif ( m/^--CopyIn=(.*)/ ) {
4827
            push @copy, MakeSrcResolve ( $1 );
4834
            push @copy, MakeSrcResolve ( $1 );
4828
 
4835
 
4829
 
-
 
4830
        } elsif ( $framework && m/^--\w+=(.+)/ ) {
4836
        } elsif ( $framework && m/^--\w+=(.+)/ ) {
4831
            push @framework_opts, $_;
4837
            push @framework_opts, $_;
4832
 
4838
 
4833
        } else {
4839
        } else {
4834
            push @args, $_;
4840
            push @args, $_;
Line 5026... Line 5032...
5026
    $test_entry{'args'}     = \@uargs;
5032
    $test_entry{'args'}     = \@uargs;
5027
    $test_entry{'auto'}     = $auto if ( $auto );
5033
    $test_entry{'auto'}     = $auto if ( $auto );
5028
    $test_entry{'utfformat'}= $utfFormat if ( $utfFormat );
5034
    $test_entry{'utfformat'}= $utfFormat if ( $utfFormat );
5029
    $test_entry{'utfargs'}  = \@utfArgs;
5035
    $test_entry{'utfargs'}  = \@utfArgs;
5030
    $test_entry{'utfname'}  = $utfName;
5036
    $test_entry{'utfname'}  = $utfName;
-
 
5037
    $test_entry{'maxtime'}  = $maxTime if ($maxTime);
5031
    $test_entry{'copyin'}   = \@copy;
5038
    $test_entry{'copyin'}   = \@copy;
5032
    $test_entry{'copyonce'} = ();
5039
    $test_entry{'copyonce'} = ();
5033
    $test_entry{'preq'}     = \@preq_files;
5040
    $test_entry{'preq'}     = \@preq_files;
5034
    $test_entry{'testdir'}  = 'BINDIR';
5041
    $test_entry{'testdir'}  = 'BINDIR';
5035
 
5042
 
Line 9370... Line 9377...
9370
        my $test_name = $pEntry->{'test_name'};
9377
        my $test_name = $pEntry->{'test_name'};
9371
        push @TESTPROJECT_TO_URUN, $test_name;
9378
        push @TESTPROJECT_TO_URUN, $test_name;
9372
        push @TESTPROJECT_TO_ARUN, $test_name if     ($pEntry->{'auto'} );
9379
        push @TESTPROJECT_TO_ARUN, $test_name if     ($pEntry->{'auto'} );
9373
 
9380
 
9374
        my $tprog = $tdir . '/' . StripDir( $pEntry->{'prog'} );
9381
        my $tprog = $tdir . '/' . StripDir( $pEntry->{'prog'} );
-
 
9382
 
-
 
9383
        #
-
 
9384
        #   Determine the maximum time that the automated test should run
-
 
9385
        #       Default is 30 minutes
-
 
9386
        #   Non-auto tests are not time limited
-
 
9387
        #       
-
 
9388
        my $timeout = '';
-
 
9389
        if ($pEntry->{'auto'})
-
 
9390
        {
-
 
9391
            $timeout = 'timeout -Time:' . ($pEntry->{'maxtime'} || '30m') . ' ';
-
 
9392
        }
9375
        
9393
        
9376
        my $me = MakeEntry::New( *MAKEFILE, $test_name, '--Phony' );
9394
        my $me = MakeEntry::New( *MAKEFILE, $test_name, '--Phony' );
9377
 
9395
 
9378
        #
9396
        #
9379
        #   Export GBE_UTF... for the duration of the test
9397
        #   Export GBE_UTF... for the duration of the test
Line 9428... Line 9446...
9428
        $me->AddShellRecipe ( "cd $tdir" );
9446
        $me->AddShellRecipe ( "cd $tdir" );
9429
        $me->AddShellRecipe ( ["GBE_TYPE=\$(GBE_TYPE)",
9447
        $me->AddShellRecipe ( ["GBE_TYPE=\$(GBE_TYPE)",
9430
                               "GBE_HOST=\$(GBE_HOST)",
9448
                               "GBE_HOST=\$(GBE_HOST)",
9431
                               "GBE_ROOT=\$(GBE_ROOT_ABS)",
9449
                               "GBE_ROOT=\$(GBE_ROOT_ABS)",
9432
                               "PATH=.\\$::ScmPathSep\$(BINDIR_LOCAL_PATH)\\$::ScmPathSep\$\$PATH",
9450
                               "PATH=.\\$::ScmPathSep\$(BINDIR_LOCAL_PATH)\\$::ScmPathSep\$\$PATH",
9433
                               $pEntry->{'command'},
9451
                               $timeout . $pEntry->{'command'},
9434
                               @{$pEntry->{'args'}},
9452
                               @{$pEntry->{'args'}},
9435
                               ] , 
9453
                               ] , 
9436
                               'echo $$? > utf.$${GBE_UTFUID}.rc' );
9454
                               'echo $$? > utf.$${GBE_UTFUID}.rc' );
9437
 
9455
 
9438
        #
9456
        #