File: bisect.sh

package info (click to toggle)
libdevel-cover-perl 1.51-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,036 kB
  • sloc: perl: 10,861; sh: 687; makefile: 7
file content (62 lines) | stat: -rwxr-xr-x 1,399 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh

# set -x

perl=~/g/perl/perl
bisect=${perl}-bisect
dc=~/g/perl/Devel--Cover
inst=/usr/local/pkg/bisect
blead=$inst/bin/perl

case "$1" in
    "launch")
        shift
        if [ -z "$1" ]; then
            echo "usage: $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

# if you need to invert the exit code, replace the exit in your test with:
[ $ret -eq 0 ] && exit 1
exit 0