Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make the bisect script useful.

  • Loading branch information...
commit 90f177abb639f281374bd52f7303459dba002699 1 parent 39d124c
Paul Johnson authored
Showing with 55 additions and 16 deletions.
  1. +55 −16 utils/bisect.sh
71 utils/bisect.sh
View
@@ -1,23 +1,62 @@
-#!/bin/sh -x
+#!/bin/sh
-make
-make
-make clean
-cp /tmp/accessor /tmp/Accessor_maker.pm tests
-cp /tmp/accessor.5.008 test_output/cover
-perl Makefile.PL
-make
-t=t/e2e/aaccessor.t
-[ ! -e $t ] && t=t/aaccessor.t
-make test TEST_FILES=$t
+# set -x
-ret=$?
-[ $ret -gt 127 ] && ret=127
+perl=~/g/perl/perl
+bisect=${perl}-bisect
+dc=~/g/perl/Devel--Cover
+inst=/usr/local/pkg/bisect
+blead=$inst/bin/perl
-rm tests/accessor tests/Accessor_maker.pm test_output/cover/accessor.5.008
+case "$1" in
+ "launch")
+ shift
+ if [ -z "$1" ]; then
+ echo "uasge: $0 launch your_test"
+ exit 1
+ fi
+ test="$1"
+ shift
+ cd $perl
+ git checkout blead
+ # $bisect/Porting/bisect.pl -Dnoextensions=Encode "$@" -- $dc/$0 "$test"
+ $bisect/Porting/bisect.pl -Dusedevel -Uversiononly -Dprefix=$inst "$@" -- $dc/$0 "$test"
+ ;;
+ "test")
+ $blead -v
+ ret=$?
+ [ $ret -gt 127 ] && ret=127
+ exit $ret
+ ;;
+ "bug_and")
+ rm -rf $inst
+ cd $perl
+ make install
+ # ./perl installperl -v
+ cd $dc
+ $blead Makefile.PL
+ make
+ make
+ make out TEST=uncoverable
+ grep -F '0 -0 1 $x and $y' uncoverable.out
+ ret=$?
+ [ $ret -gt 127 ] && ret=127
+ exit $ret
+ [ $ret -eq 0 ] && exit 1
+ exit 0
+ ;;
+ *)
+ echo cd $perl
+ echo git clean -dxf
+ echo cp -a $perl $bisect
+ echo cd $dc
+ echo edit $0 and add your_test
+ echo $0 launch your_test [--start v5.14.0 --end v5.15.0]
+ ;;
+esac
-# exit $ret
+exit
-#if you need to invert the exit code, replace the above exit with this:
+#if you need to invert the exit code, replace the exit in your test with:
[ $ret -eq 0 ] && exit 1
exit 0
Please sign in to comment.
Something went wrong with that request. Please try again.