Changeset 26030 for trunk/ippScripts/scripts/dist_defineruns.pl
- Timestamp:
- Nov 4, 2009, 11:34:42 AM (17 years ago)
- File:
-
- 1 moved
-
trunk/ippScripts/scripts/dist_defineruns.pl (moved) (moved from trunk/ippScripts/scripts/dist_queue_runs.pl ) (5 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/dist_defineruns.pl
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/czw_branch/cleanup/ippScripts/scripts/dist_queue_runs.pl merged eligible /branches/eam_branches/20090522/ippScripts/scripts/dist_queue_runs.pl merged eligible /branches/eam_branches/20090715/ippScripts/scripts/dist_queue_runs.pl merged eligible /branches/eam_branches/20090820/ippScripts/scripts/dist_queue_runs.pl merged eligible /branches/pap/ippScripts/scripts/dist_queue_runs.pl merged eligible /branches/pap_mops/ippScripts/scripts/dist_queue_runs.pl 25137-25255
r26023 r26030 1 1 #!/usr/bin/env perl 2 # 3 # dist_queue_runs.pl : run disttool -definebyquery for the various stages or one stage 4 # 2 5 3 6 use Carp; … … 40 43 my ($stage, $stage_limit, $dist_root, $no_magic); 41 44 my ($dbname, $save_temps, $verbose, $no_update, $logfile); 45 my @labels; 42 46 43 47 GetOptions( 48 'stage=s' => \$stage, # stage to queue 49 'label=s' => \@labels, # labels 50 'stage_limit=s' => \$stage_limit,# maximum number of runs queued for each stage 44 51 'dist_root=s' => \$dist_root, # root of distribution work area 45 'stage=s' => \$stage, # stage to queue 46 'stage_limit=s' => \$stage_limit,# maximum number of runs queued for each stage 47 'no_magic' => \$no_magic, # queue runs without requiring magic 52 'no_magic' => \$no_magic, # queue runs without requiring magic (for testing only) 48 53 'dbname=s' => \$dbname, # Database name 49 54 'verbose' => \$verbose, # Print stuff? … … 54 59 55 60 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV; 56 if (0) { 57 pod2usage( -msg => "Required options: --stage", 61 pod2usage( -msg => "Required options: --label", 58 62 -exitval => 3) unless 59 defined $stage; 60 } 63 (scalar @labels > 0); 61 64 62 65 $ipprc->redirect_output($logfile) if $logfile; … … 67 70 } 68 71 69 my ($day, $month, $year) = ( localtime)[3,4,5];72 my ($day, $month, $year) = (gmtime)[3,4,5]; 70 73 my $datestr = sprintf "%04d%02d%02d", $year+1900, $month + 1, $day; 71 74 … … 82 85 } 83 86 84 # XXX: how shall we deal with labels?85 my $label = 'proc';86 87 87 foreach my $stage (@stages) { 88 my $command = "$disttool -definebyquery -stage $stage -workdir $workdir"; 89 $command .= " -no_magic" if $no_magic; 90 $command .= " -dry_run" if $no_update; 91 $command .= " -limit $stage_limit" if $stage_limit; 92 $command .= " -set_label $label"; 93 $command .= " -dbname $dbname" if defined $dbname; 94 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 95 run(command => $command, verbose => $verbose); 96 unless ($success) { 97 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 98 &my_die("Unable to perform $command error_code: $error_code", $error_code); 88 foreach my $label (@labels) { 89 my $command = "$disttool -definebyquery -stage $stage -workdir $workdir -label $label"; 90 $command .= " -no_magic" if $no_magic; 91 $command .= " -dry_run" if $no_update; 92 $command .= " -limit $stage_limit" if $stage_limit; 93 $command .= " -set_label $label"; 94 $command .= " -dbname $dbname" if defined $dbname; 95 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 96 run(command => $command, verbose => $verbose); 97 unless ($success) { 98 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 99 &my_die("Unable to perform $command error_code: $error_code", $error_code); 100 } 101 # display the output from the command 102 print STDERR join "", @$stdout_buf if $verbose; 99 103 } 100 # display the output from the command101 print STDERR join "", @$stdout_buf if $verbose;102 104 } 103 105 106 if (0) { 107 # notyet 104 108 # queue rcRuns for any distRuns that have completed and have interested destinations 105 {106 109 my $command = "$disttool -queuercrun"; 107 110 $command .= " -dbname $dbname" if defined $dbname; -
Property svn:mergeinfo
set to (toggle deleted branches)
Note:
See TracChangeset
for help on using the changeset viewer.
