File: bisect-example.sh

package info (click to toggle)
perl 5.24.1-3+deb9u5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 103,716 kB
  • sloc: perl: 559,611; ansic: 293,886; sh: 67,316; pascal: 7,632; cpp: 3,895; makefile: 2,436; xml: 2,410; yacc: 989; sed: 6; lisp: 1
file content (36 lines) | stat: -rwxr-xr-x 1,281 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
echo >&2 You need to edit this to run your test case
exit 1

git clean -dxf

# If you get './makedepend: 1: Syntax error: Unterminated quoted
# string' when bisecting versions of perl older than 5.9.5 this hack
# will work around the bug in makedepend.SH which was fixed in
# version 96a8704c. Make sure to uncomment 'git checkout makedepend.SH'
# below too.
#git show blead:makedepend.SH > makedepend.SH

# If you can use ccache, add -Dcc=ccache\ gcc -Dld=gcc to the Configure line
# if Encode is not needed for the test, you can speed up the bisect by
# excluding it from the runs with -Dnoextensions=Encode
# ie
#./Configure -Dusedevel -Doptimize=-g -Dcc=ccache\ gcc -Dld=gcc -Dnoextensions=Encode -des
./Configure -Dusedevel -Doptimize=-g -des
test -f config.sh || exit 125
# Correct makefile for newer GNU gcc
perl -ni -we 'print unless /<(?:built-in|command)/' makefile x2p/makefile
# if you just need miniperl, replace test_prep with miniperl
make test_prep
[ -x ./perl ] || exit 125
# This runs the actual testcase. You could use -e instead:
./perl -Ilib ~/testcase.pl
ret=$?
[ $ret -gt 127 ] && ret=127
git checkout makedepend.SH
git clean -dxf
exit $ret

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