diff --git a/scripts/build/Dyninst/dyninst.pm b/scripts/build/Dyninst/dyninst.pm index 794785fc..38b432e4 100644 --- a/scripts/build/Dyninst/dyninst.pm +++ b/scripts/build/Dyninst/dyninst.pm @@ -88,16 +88,14 @@ sub run { # Always set up logs, even if doing a restart my ($base_dir, $build_dir) = setup($root_dir, $args); - my $should_proceed = 1; + return unless $args->{'build-dyninst'}; - return $should_proceed unless $args->{'build-dyninst'}; - - $should_proceed = eval { + eval { $logger->write("Configuring Dyninst... ", 'eol' => ''); configure($args, $base_dir, $build_dir); $logger->write("done."); - return 0 if $args->{'only-config'}; + return if $args->{'only-config'}; save_compiler_config("$build_dir/config.out", "$base_dir/build/compilers.conf"); @@ -108,10 +106,8 @@ sub run { if($@) { $logger->write($@); open my $fdOut, '>', "$root_dir/dyninst/Build.FAILED"; - $should_proceed = 0; + die $@; } - - return $should_proceed; } 1; diff --git a/scripts/build/Dyninst/restart.pm b/scripts/build/Dyninst/restart.pm index 8f0f62b7..2d876806 100644 --- a/scripts/build/Dyninst/restart.pm +++ b/scripts/build/Dyninst/restart.pm @@ -30,8 +30,7 @@ sub setup { # wants to run the tests, but the user requested not # to build the Testsuite, then we can't continue if (!$testsuite_ok && $args->{'run-tests'} && !$user_wants_to_build_tests) { - print "The Testsuite in '$args->{'restart'}' must be rebuilt\n"; - exit 1; + die "The Testsuite in '$args->{'restart'}' must be rebuilt\n"; } # Remove the FAILED files (if present) diff --git a/scripts/build/Dyninst/testsuite.pm b/scripts/build/Dyninst/testsuite.pm index 61e24f73..b63a091b 100644 --- a/scripts/build/Dyninst/testsuite.pm +++ b/scripts/build/Dyninst/testsuite.pm @@ -238,6 +238,7 @@ sub run { } catch { $logger->write($_); open my $fdOut, '>', "$root_dir/testsuite/Build.FAILED"; + die $_; } } diff --git a/scripts/build/Dyninst/utils.pm b/scripts/build/Dyninst/utils.pm index 626f4592..d7f33009 100644 --- a/scripts/build/Dyninst/utils.pm +++ b/scripts/build/Dyninst/utils.pm @@ -62,7 +62,7 @@ sub upload { . "-F \"token=$token\" " . "https://bottle.cs.wisc.edu/upload"); } catch { - warn "An error occurred when uploading the results\n$_\n"; + die "An error occurred when uploading the results\n$_\n"; } } diff --git a/scripts/build/build.pl b/scripts/build/build.pl index dac815ac..0f1342ff 100644 --- a/scripts/build/build.pl +++ b/scripts/build/build.pl @@ -60,12 +60,11 @@ $logger->write("root_dir: $root_dir"); -# Build Dyninst and the test suite. -if (Dyninst::dyninst::run($args, $root_dir, $logger)) { +# Build Dyninst +Dyninst::dyninst::run($args, $root_dir, $logger); - # This also runs the test suite if everything is good. - Dyninst::testsuite::run($args, $root_dir, $logger); -} +# Build and execute test suite +Dyninst::testsuite::run($args, $root_dir, $logger); # Save the results in a tarball my $tarball_name = Dyninst::results::save($args, $root_dir);