Subversion Repositories DevTools

Rev

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

Rev 299 Rev 321
Line 130... Line 130...
130
#
130
#
131
if ( $GBE_SANDBOX )
131
if ( $GBE_SANDBOX )
132
{
132
{
133
   $opt_view_root = $GBE_SANDBOX;
133
   $opt_view_root = $GBE_SANDBOX;
134
   $opt_prefix = 0;
134
   $opt_prefix = 0;
-
 
135
   (my $sandbox_name = $GBE_SANDBOX) =~ s~.*/~~ ;
-
 
136
   $opt_tag = 'sandbox.'. $sandbox_name unless ( $opt_tag );
135
}
137
}
136
 
138
 
137
#
139
#
138
#   Parse the user options
140
#   Parse the user options
139
#
141
#
Line 564... Line 566...
564
    #       1) Did not work on WindowsServer based build machine ??
566
    #       1) Did not work on WindowsServer based build machine ??
565
    #       2) Deleting the view could be a problem if the user had
567
    #       2) Deleting the view could be a problem if the user had
566
    #          files open in the view.
568
    #          files open in the view.
567
    #       3) Documentation doesn't really like the use of -colocated
569
    #       3) Documentation doesn't really like the use of -colocated
568
    #
570
    #
569
    #
-
 
570
    foreach my $view_count ( 1 .. 5 )
571
    foreach my $view_count ( 1 .. 5 )
571
    {
572
    {
572
        my $cc_race_condition;
573
        my $cc_race_condition;
573
        my $cmd = ClearToolCmd ('mkview', '-snapshot', '-tag', $VIEWTAG, $VIEWDIR);
574
        my $cmd = ClearToolCmd ('mkview', '-snapshot', '-tag', $VIEWTAG, $VIEWDIR);
574
        open(CMD, "$cmd 2>&1 |") || Error( "can't run command: $!");
575
        open(CMD, "$cmd 2>&1 |") || Error( "can't run command: $!");
-
 
576
        @error_list = ();
575
        while (<CMD>)
577
        while (<CMD>)
576
        {
578
        {
577
            #
579
            #
578
            #   Filter output from the user
580
            #   Filter output from the user
579
            #
581
            #
580
            chomp;
582
            chomp;
581
            tr~\\/~/~s;
583
            tr~\\/~/~s;
-
 
584
            push @error_list, $_ if ( m~Error:~ );
582
            Verbose2("mkview: $_");
585
            Verbose2("mkview: $_");
583
 
586
 
584
            #
587
            #
585
            #   Detect Race condition
588
            #   Detect Race condition
586
            #   Multiple build daemons creating views too fast for ClearCase
589
            #   Multiple build daemons creating views too fast for ClearCase
Line 603... Line 606...
603
            sleep ( $view_count );
606
            sleep ( $view_count );
604
            next;
607
            next;
605
        }
608
        }
606
        last;
609
        last;
607
    }
610
    }
608
    Error ("Cannot locate the created static view")
611
    Error ("Cannot locate the created static view", @error_list)
609
        unless ( -d $VIEWDIR );
612
        unless ( -d $VIEWDIR );
610
 
613
 
611
    #   In order to operate in this view (ie set the config spec, we need to
614
    #   In order to operate in this view (ie set the config spec, we need to
612
    #   be in the directory of the view
615
    #   be in the directory of the view
613
    #
616
    #
Line 765... Line 768...
765
        JatsCmd('make', $make_type, 'NODEPEND=1')   and Error("Package did not make");
768
        JatsCmd('make', $make_type, 'NODEPEND=1')   and Error("Package did not make");
766
        JatsCmd('install');
769
        JatsCmd('install');
767
 
770
 
768
        if ( $opt_runtests )
771
        if ( $opt_runtests )
769
        {
772
        {
770
            JatsCmd('make', 'run_unit_tests')      and Error("Tests did not run corectly");
773
            JatsCmd('make', 'run_unit_tests')      and Error("Tests did not run correctly");
771
        }
774
        }
772
    }
775
    }
773
    else
776
    else
774
    {
777
    {
775
        #
778
        #
Line 942... Line 945...
942
            chomp;
945
            chomp;
943
            Verbose("lsview: $_");
946
            Verbose("lsview: $_");
944
            $uuid = $1 if ( m~^View uuid:\s+(.*)~ );
947
            $uuid = $1 if ( m~^View uuid:\s+(.*)~ );
945
        }
948
        }
946
        close(CMD);
949
        close(CMD);
947
 
-
 
948
        if ( $uuid )
950
        if ( $uuid )
949
        {
951
        {
950
            Warning ("Deleting view - the hard way");
952
            Warning ("Deleting view - the hard way");
951
            ClearTool( '--Quiet', 'rmview', '-force', '-all', '-uuid', $uuid );
953
            ClearTool( '--Quiet', 'rmview', '-force', '-all', '-uuid', $uuid );
952
            ClearTool( '--Quiet', 'unregister', '-view', '-uuid', $uuid );
954
            ClearTool( '--Quiet', 'unregister', '-view', '-uuid', $uuid );