diff options
author | Florent Villard <warly@mandriva.com> | 2005-12-13 07:01:47 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2005-12-13 07:01:47 +0000 |
commit | 09d0bd09fe9e6d473f3a7496a306dea7b6c68062 (patch) | |
tree | ad99c7b7d5dde18ce70b8613f74088d5b3136002 /iurt2 | |
parent | 6cdb99f82b4fc71801bdafe96c13d4d985927f95 (diff) | |
download | iurt-09d0bd09fe9e6d473f3a7496a306dea7b6c68062.tar iurt-09d0bd09fe9e6d473f3a7496a306dea7b6c68062.tar.gz iurt-09d0bd09fe9e6d473f3a7496a306dea7b6c68062.tar.bz2 iurt-09d0bd09fe9e6d473f3a7496a306dea7b6c68062.tar.xz iurt-09d0bd09fe9e6d473f3a7496a306dea7b6c68062.zip |
add custom regexp matching for perform_command output, perform a glob to see if some packages were generated
Diffstat (limited to 'iurt2')
-rwxr-xr-x | iurt2 | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -193,7 +193,6 @@ foreach my $dir ("/mnt/BIG/dis/$distro_version/SRPMS/$media/", @special_srpm_dir closedir $rpmdir } -$::run->{$distro_tag}{$my_arch}++; my $run = $::run->{$distro_tag}{$my_arch}++; dump_cache(); @@ -277,7 +276,8 @@ foreach my $t (@todo) { timeout => 18000, cc => $cc, log => "$local_spool/log/", - freq => 1)) { + error_regexp => 'rror.*ailed', + freq => 1) && !glob "$chroot/home/builder/rpm/RPMS/*/*.rpm") { $::failure->{$srpm}{$my_arch} = 1; next } @@ -287,11 +287,12 @@ foreach my $t (@todo) { hash => "binary_test_$srpm", timeout => 300, freq => 1, + error_regexp => 'unable to access', log => "$local_spool/log/")) { $::failure->{$srpm}{$my_arch} = 1; next } - system("cp $chroot/home/builder/rpm/RPMS/*/*.rpm $local_spool") and print "ERROR: could not copy rpm files frpm $chroot/home/builder/rpm/RPMS/ to $local_spool ($!)\n"; + system("cp $chroot/home/builder/rpm/RPMS/*/*.rpm $local_spool") and print "ERROR: could not copy rpm files from $chroot/home/builder/rpm/RPMS/ to $local_spool ($!)\n"; process_queue(); } @@ -441,7 +442,7 @@ sub perform_command { } # FIXME process goes in defunct always, kill -14 should unsleep it, but not kill 9, $pid; - if ($?) { + if ($? || $opt{error_regexp} ? $output =~ /$opt{error_regexp}/ : 1) { if ($opt{mail}) { if ($::warning->{$opt{hash}}{$my_arch}{$opt{mail}} % $opt{freq}) { sendmail($opt{mail}, $opt{cc} , $opt{error} , $output, 0, 0); @@ -450,7 +451,7 @@ sub perform_command { } } $::warning->{$opt{hash}}{$my_arch}{$opt{mail}}++; - print $output; + print "\n$output\n"; die "FATAL iurt: $opt{error}." if $opt{die}; return 0 } |