From 8e6dd9cb29e9c03670d2d4e093d51eebe74ed950 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 12 Jun 2013 15:17:24 +0200 Subject: write_buildcustomize.pl now test loads the generated lib/buildcustomize.pl And deletes it if it encounters an error whilst loading it. A non-functional lib/buildcustomize.pl will cause the build to fail with seemingly unrelated errors. Deleting it and exiting with an error should make the cause of build failures obvious. --- write_buildcustomize.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/write_buildcustomize.pl b/write_buildcustomize.pl index 709923baa2..92c75de93e 100644 --- a/write_buildcustomize.pl +++ b/write_buildcustomize.pl @@ -65,8 +65,12 @@ if ($error) { close $fh or warn "Can't unlink $file after error: $!"; } else { - close $fh and exit; - $error = "Can't close $file: $!"; + if (close $fh) { + do $file and exit; + $error = "Can't load generated $file: $@"; + } else { + $error = "Can't close $file: $!"; + } } # It's going very wrong, so try to remove the botched file. -- cgit v1.2.1