3 PERL_TESTSDIR
="/usr/share/perl/perl-tests"
4 PERL_LIBDIR
="/usr/lib/perl5/%%PERL_VERSION%%/"
5 PERL_DISABLEDTESTS
="%%PERL_DISABLEDTESTS%%"
11 while [ ! -z "$1" ]; do
21 manual_run_no_base
="yes"
24 echo "run_tests.sh [-n|-m|-mb|--help]"
27 echo " -n Just prepare the environment. Don't actually run any tests"
28 echo " -m Run tests manually according to MANIFEST, instead of whatever t/TEST chooses"
29 echo " -mb Don't run base tests. Implies -m"
30 echo " --help Print this help ;)"
35 echo "Invalid argument: $1"
41 if [ ! -f "$PERL_TESTSDIR/__prepared" ]; then
42 # Many tests insist on having PERL5LIB in $PERL_TESTSDIR/lib. However,
43 # that directory may also contain tests. Some of them(FindBin.t in particular)
44 # also demand being located in a directory ending with "lib". So we can't do symlink
46 # Our solution is to just copy PERL5LIB over.
47 if [ -d "$PERL_TESTSDIR/lib" ]; then
48 cp -a "$PERL_LIBDIR/"* "$PERL_TESTSDIR/lib/"
50 ln -s "$PERL_LIBDIR" "$PERL_TESTSDIR/lib"
53 ln -s /usr
/bin
/perl
"$PERL_TESTSDIR/perl"
54 ln -s /usr
/bin
/perl
"$PERL_TESTSDIR/t/perl"
55 touch "$PERL_TESTSDIR/__prepared"
57 for i
in $PERL_DISABLEDTESTS; do
58 echo "Disabling $i tests"
59 sed 's!^'$i'.*$!!' -i $PERL_TESTSDIR/MANIFEST
62 cat $PERL_TESTSDIR/MANIFEST |
grep -v '^$' > $PERL_TESTSDIR/MANIFEST_NEW
63 rm $PERL_TESTSDIR/MANIFEST
64 mv $PERL_TESTSDIR/MANIFEST_NEW
$PERL_TESTSDIR/MANIFEST
67 if [ -z "$no_run" ]; then
69 if [ ! -z "$manual_run" ]; then
70 for i
in $
(cat ..
/MANIFEST |
sed 's/\t.*$//g' |
grep '\.t$'); do
71 if [ ! -z "$manual_run_no_base" ] && [ ! -z "$(echo $i | grep '^t/')" ]; then