This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
FAQ sync.
[perl5.git] / Porting / testall.atom
CommitLineData
b4324e9b
JH
1#!/bin/sh
2
3#
4# testall.atom
5#
6# This script creates all.Counts file that can be fed to prof(1)
7# to produce various basic block counting profiles.
8#
9# This script needs to be run at the top level of the Perl build
10# directory after the "make all" and "make test" targets have been run.
11#
12# You will also need to have perl.pixie built,
13# which means that you will also have Configured with -Doptimize=-g.
14#
15# After the script has been run (this will take several minutes)
16# you will have a file called all.Counts, which contains the cumulative
17# basic block counting results over the whole Perl test suite.
18# You can produce various reports using prof(1);
19#
20# prof -pixie -all -L. perl all.Counts
21# prof -pixie -heavy -all -L. perl all.Counts
22# prof -pixie -invocations -all -L. perl all.Counts
23# prof -pixie -lines -all -L. perl all.Counts
24# prof -pixie -testcoverage -all -L. perl all.Counts
25# prof -pixie -zero -all -L. perl all.Counts
26#
27# io/openpid and op/fork core on me, I don't know why and haven't
28# taken a look yet.
29#
30# jhi@iki.fi
31#
32
33if test ! -f /usr/bin/atom
34then
35 echo "$0: no /usr/bin/atom"
36 exit 1
37fi
38
39if test ! -f perl; then echo "$0: no perl"; exit 1; fi
40if test ! -f perl.pixie; then echo "$0: no perl.pixie; exit 1; fi
41if test ! -f t/perl; then echo "$0: no t/perl; exit 1; fi
42
43LD_LIBRARY_PATH=`pwd`
44export LD_LIBRARY_PATH
45
46cd t || exit 1
47
48ln -sf ../perl.pixie .
49
50the_t=`echo base/*.t comp/*.t cmd/*.t run/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t pod/*.t camel-III/*.t`
51
52PERL_DESTRUCT_LEVEL=2
53export PERL_DESTRUCT_LEVEL
54
55rm -f all.Counts
56
57for t in $the_t
58do
59 echo `echo $t|sed s:\.t$::`" \c"
60 case "$t" in
61 *taint*|pragma/locale.t|lib/basename.t)
62 T=-T ;;
63 *)
64 T='' ;;
65 esac
66 ./perl.pixie $T $t > /dev/null
67 if cd ..
68 then
69 if test -f all.Counts
70 then
71 prof -pixie -merge new.Counts -L. -incobj libperl.so perl t/perl.Counts all.Counts
72 mv new.Counts all.Counts
73 else
74 mv t/perl.Counts all.Counts
75 fi
76 cd t
77 fi
78done
79
80exit 0