summaryrefslogtreecommitdiff
path: root/Porting/bisect.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-10-05 18:19:37 +0200
committerNicholas Clark <nick@ccl4.org>2011-10-05 18:20:58 +0200
commit5842706e83dd891ae900337e296a9702a46e172a (patch)
treeba8972cdd0fc3dac1e56a5ae52008b74a6421c67 /Porting/bisect.pl
parentb4f0ec5ff12b8d153795b1eb2d8a72e127f3bbfe (diff)
downloadperl-5842706e83dd891ae900337e296a9702a46e172a.tar.gz
Document why bisect.pl can't be in the checkout used for bisecting.
Add a sanity test to catch this case.
Diffstat (limited to 'Porting/bisect.pl')
-rwxr-xr-xPorting/bisect.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/Porting/bisect.pl b/Porting/bisect.pl
index f3ae566296..98cd127f34 100755
--- a/Porting/bisect.pl
+++ b/Porting/bisect.pl
@@ -16,6 +16,14 @@ $runner =~ s/bisect\.pl/bisect-runner.pl/;
die "Can't find bisect runner $runner" unless -f $runner;
+{
+ my ($dev0, $ino0) = stat $0;
+ die "Can't stat $0: $!" unless defined $ino0;
+ my ($dev1, $ino1) = stat 'Porting/bisect.pl';
+ die "Can't run a bisect using the directory containing $runner"
+ if defined $dev1 && $dev0 == $dev1 && $ino0 == $ino1;
+}
+
system $^X, $runner, '--check-args', @ARGV and exit 255;
# We try these in this order for the start revision if none is specified.