Changeset 2580 in /cluster/svnroot


Ignore:
Timestamp:
Aug 25, 2010 3:58:34 PM (10 years ago)
Author:
leemasa
Message:

Fixed a few little bugs that caused the program to halt when a program returned no output. (#525)
Added explicit exim4 installation to build_livecd.pl (#523)

Location:
bccd-ng/branches/leemasa-devel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/leemasa-devel/bin/build_livecd.pl

    r2574 r2580  
    8585Readonly my $LIBFETCH   => "/root/liberate";
    8686$ENV{'DEBIAN_FRONTEND'} = "noninteractive";
    87 Readonly my $PACKAGES   => "screen openssh-client openssh-server less make gcc-4.2 g++-4.2 flex bison gdb alien lsb-rpm cvs bzip2 sudo yum debootstrap rsync dhcp3-server tftpd-hpa tcpdump syslinux syslinux-common subversion nfs-common nfs-kernel-server ncurses-base ncurses-bin libncurses5 libncurses5-dev psmisc vim iproute pciutils host bc ntp ntpdate debconf-utils dhcpcd rsh-client rsh-server xbase-clients libxt-dev lesstif2 lesstif2-dev ipcalc dialog lvm2 grub parted tzdata xserver-xorg-video-fbdev xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-xorg-video-all fontconfig xfonts-base gpm udev vtwm aterm rxvt xbase-clients menu bbkeys libwww-mechanize-perl postgresql-client-common postgresql-client-8.3 libdbi-perl libdbd-pg-perl strace tcsh libnet-dhcp-perl libnetaddr-ip-perl libnet-ip-perl libstdc++5 pdnsd csh libterm-readkey-perl libsvn-perl libui-dialog-perl libreadonly-perl sshfs autofs libnet-dhcp-perl dnsutils libfile-touch-perl libnet-cidr-perl arping dosfstools gawk dc glutg3-dev libxi-dev wireless-tools snmp snmpd netpbm imagemagick libyaml-perl libmime-lite-perl libmail-sendmail-perl";
     87Readonly my $PACKAGES   => "screen openssh-client openssh-server less make gcc-4.2 g++-4.2 flex bison gdb alien lsb-rpm cvs bzip2 sudo yum debootstrap rsync dhcp3-server tftpd-hpa tcpdump syslinux syslinux-common subversion nfs-common nfs-kernel-server ncurses-base ncurses-bin libncurses5 libncurses5-dev psmisc vim iproute pciutils host bc ntp ntpdate debconf-utils dhcpcd rsh-client rsh-server xbase-clients libxt-dev lesstif2 lesstif2-dev ipcalc dialog lvm2 grub parted tzdata xserver-xorg-video-fbdev xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-xorg-video-all fontconfig xfonts-base gpm udev vtwm aterm rxvt xbase-clients menu bbkeys libwww-mechanize-perl postgresql-client-common postgresql-client-8.3 libdbi-perl libdbd-pg-perl strace tcsh libnet-dhcp-perl libnetaddr-ip-perl libnet-ip-perl libstdc++5 pdnsd csh libterm-readkey-perl libsvn-perl libui-dialog-perl libreadonly-perl sshfs autofs libnet-dhcp-perl dnsutils libfile-touch-perl libnet-cidr-perl arping dosfstools gawk dc glutg3-dev libxi-dev wireless-tools snmp snmpd netpbm imagemagick libyaml-perl libmime-lite-perl exim4";
    8888Readonly my $EXTRA_PACKAGES => "fftw2 fftw-dev sfftw-dev sfftw2 automake1.7 console-tools libreadline5-dev hal libxmu-headers libxmu-dev gfortran ethtool libssl0.9.8 libblas-dev libblas-dev atlas3-base atlas3-base-dev atlas3-base refblas3 lapack3 atlas3-test libg2c0-dev libg2c0 apache2 iceweasel xpdf octave3.0 ruby sl robotfindskitten pvm xpvm emacs grac blender automake1.9 libtool libglu1-mesa-dev minicom lcd4linux insight joe grace libxpm-dev telnet lsof xresprobe fbset fluxbox xgalaga zenmap nedit eterm";
    8989Readonly my $BAD_PACKAGES   => ""; # Packages that throw some fatal error during install but still work
  • bccd-ng/branches/leemasa-devel/trees/home/bccd/tests/bccd_test_suite.pl

    r2578 r2580  
    9191                my $test = $testlist[$i];
    9292                if (-e "$testdir/$test.dat" or -e "$controldir/$test.dat"){
    93                         system("touch $testdir/$test.dat $controldir/$test.dat") or die "Error creating empty test file: $!";
     93
     94                        if (-e "$testdir/$test.dat" xor -e "$controldir/$test.dat"){
     95                                system("touch $testdir/$test.dat $controldir/$test.dat")
     96                                or die "Error creating $testdir/$test.dat or $controldir/$test.dat: $!";
     97                        }
     98                        system ("diff $testdir/$test.dat $controldir/$test.dat > $diffdir/$test.diff"); #examine differences, output to file.
     99                                my @diff_lines_raw #count lines in differences files.
     100                                = split(/ /,`wc -l $diffdir/$test.diff`);
     101
     102#take first value from wc -l, the number
     103                        my $diff_lines = $diff_lines_raw[0];
     104
     105                        if ($diff_lines > 0){
     106                                my $added_lines = `grep \"^>\" $diffdir/$test.diff`;
     107                                my $missing_lines = `grep \"^<\" $diffdir/$test.diff`;
     108                                my @lines_added = split(/\n/,$added_lines);
     109                                my $lines_added = @lines_added;
     110                                my @lines_missing = split(/\n/,$missing_lines);
     111                                my $lines_missing = @lines_missing;
     112                                $report .= "$test had $lines_added lines added, $lines_missing missing";
     113                                $details .="Testname: $test\n" . $added_lines  . "\n";
     114                        }else{
     115                                unlink "$testdir/$test.dat";
     116                        }
    94117                }
    95                 system ("diff $testdir/$test.dat $controldir/$test.dat > $diffdir/$test.diff"); #examine differences, output to file.
    96                 my @diff_lines_raw #count lines in differences files.
    97                         = split(/ /,`wc -l $diffdir/$test.diff`);
    98          
    99                 #take first value from wc -l, the number
    100                 my $diff_lines = $diff_lines_raw[0];
    101                
    102                 if ($diff_lines > 0){
    103                         my $added_lines = `grep \"^>\" $diffdir/$test.diff`;
    104                         my $missing_lines = `grep \"^<\" $diffdir/$test.diff`;
    105                         my @lines_added = split(/\n/,$added_lines);
    106                         my $lines_added = @lines_added;
    107                         my @lines_missing = split(/\n/,$missing_lines);
    108                         my $lines_missing = @lines_missing;
    109                         $report .= "$test had $lines_added lines added, $lines_missing missing";
    110                         $details .="Testname: $test\n" . $added_lines  . "\n";
    111                 }else{
    112                         unlink "$testdir/$test.dat";
    113                 }
    114         }
    115         my $date = Mail::Sendmail::time_to_date( time() );
    116         if ($verbose){
    117                 if ($report){
    118                         print "$date:\n$report\n\n$details";
    119                 }else{
    120                         print "$date:\nNo mismatches";
    121                 }
     118    }
     119    my $date = bccd_test_suite::get_timestamp();
     120    if ($verbose){
     121            if ($report){
     122                    print "$date:\n$report\n\n$details\n";
     123            }else{
     124                    print "$date: No mismatches\n";
     125            }
     126
    122127        }
    123128
  • bccd-ng/branches/leemasa-devel/trees/home/bccd/tests/bccd_test_suite.pm

    r2578 r2580  
    8181                        mpirun -np 2 ~/$testname/$testname      $storeOutput");
    8282#XXX This function is untested from here on.
    83         if (not -e "~/machines" or `wc -l ~/machines | awk '{print \$1}'` > 1){
     83        if (-e "~/machines" and `wc -l ~/machines | awk '{print \$1}'` > 1){
    8484                system("bccd-syncdir . ~/machines       &> tmpoutput");
    8585                system("cat tmpoutput $storeOutput");
     
    101101####End test code####
    102102        close $OUTPUT
     103}
     104
     105
     106sub get_timestamp {
     107  my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
     108  my @months = ("January","February","March","April","May","June","July","August","September","October","November","December");
     109   if ($mon < 10) { $mon = "0$mon"; }
     110   if ($hour < 10) { $hour = "0$hour"; }
     111   if ($min < 10) { $min = "0$min"; }
     112   if ($sec < 10) { $sec = "0$sec"; }
     113   $year=$year+1900;
     114
     115   return $months[$mon] . ' ' . $mday . ', ' . $year . ' ' . $hour . ':' . $min . ':' . $sec;
    103116}
    104117
Note: See TracChangeset for help on using the changeset viewer.