Changeset 628 for trunk


Ignore:
Timestamp:
Oct 18, 2002, 10:37:46 AM (22 years ago)
Author:
joergs
Message:

Test ob logfile angelegt werden kann. Verwindert tausende von Fehlermeldungen, wenn dies nicht der Fall ist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/technical/common/build/buildall.pl

    r626 r628  
    22# automatisches buildskript fuer smartclient
    33# liest die konfiguration aus der mit -b übergebenen Datei
    4 # $Id: buildall.pl,v 1.16 2002/10/17 13:12:57 joergs Exp $
     4# $Id: buildall.pl,v 1.17 2002/10/18 08:37:46 joergs Exp $
    55# Philipp Storz, SuSE Linux AG
    66# pstorz@suse.de
     
    2828chomp $workdir;
    2929
    30 my $smartclient_root="../../";   # Pfad, zu dem die Pfade in buildlist stehen
     30# Pfad, zu dem die Pfade in buildlist stehen
     31my $smartclient_root="../../";   
     32
     33#my $smartclient_root="/home/joergs/projects/smartclient/stuttgarter-versicherung/technical/";
     34#$workdir="";
     35
    3136my $build = "build.sh";
    3237our ($opt_b, $opt_x);
     
    3540
    3641
    37 if (!$opt_b)
    38 {
    39 $opt_b = "buildlist";
    40 print "using default buildlist: buildlist\n\n";
    41 print "other buildlist can be specified with -b buildlist\n\n";
     42if (!$opt_b) {
     43  $opt_b = "buildlist";
     44  print "using default buildlist: buildlist\n\n";
     45  print "other buildlist can be specified with -b buildlist\n\n";
    4246};
    4347
     
    101105  print "$_ \n";
    102106  tr/\//\_/;
    103   my $logfilename = "$workdir/$mypath/$_.$ArrayofBuilds[$i][1].log";
     107  my $logfilename = "/tmp/smartclient_build/$_.$ArrayofBuilds[$i][1].log";
    104108
    105109  my $build_cmd="cd $mypath && $build";
     
    127131  print "less +F $logfilename\n\n";
    128132
    129   open( LOG_FD, ">$logfilename" );
     133  my $do_log = open( LOG_FD, ">$logfilename" ) || print "could not open logfile $logfilename";
    130134  open( PIPE, "$build_cmd 2>&1 |" );
    131135  while( <PIPE> ) {
     
    133137          print;
    134138        }
    135         print LOG_FD;
     139        print LOG_FD if $do_log;
    136140  }
    137141  close PIPE; my $retval=$?;
    138   close LOG_FD;
     142  close LOG_FD if $do_log;
    139143 
    140144  if ( $retval == 0 )
Note: See TracChangeset for help on using the changeset viewer.