1 |
|
#! /bin/sh |
2 |
|
# pdemo-exec.test - check that programs in the ../pdemo subdirectory are viable |
3 |
|
|
4 |
|
# Test script header. |
5 |
|
need_prefix=no |
6 |
|
if test -z "$srcdir"; then |
7 |
|
srcdir=`echo "$0" | sed 's%/[^/]*$%%'` |
8 |
|
test "$srcdir" = "$0" && srcdir=. |
9 |
|
test "${VERBOSE+set}" != "set" && VERBOSE=yes |
10 |
|
fi |
11 |
|
. $srcdir/defs || exit 1 |
12 |
|
|
13 |
|
if test -f ../pdemo/hell; then : |
14 |
|
else |
15 |
|
echo "You must run pdemo-make.test before running $0" 1>&2 |
16 |
|
exit 77 |
17 |
|
fi |
18 |
|
|
19 |
|
# Check to see if the programs really run. |
20 |
|
echo "Executing uninstalled programs in ../pdemo" |
21 |
|
|
22 |
|
status=0 |
23 |
|
if ../pdemo/hell.static| grep 'Welcome to GNU Hell'; then : |
24 |
|
else |
25 |
|
echo "$0: cannot execute ../pdemo/hell.static" 1>&2 |
26 |
|
status=1 |
27 |
|
fi |
28 |
|
|
29 |
|
if ../pdemo/hell | grep 'Welcome to GNU Hell'; then : |
30 |
|
else |
31 |
|
echo "$0: cannot execute ../pdemo/hell" 1>&2 |
32 |
|
status=1 |
33 |
|
fi |
34 |
|
|
35 |
|
if ../pdemo/helldl | egrep -e '(Welcome to .*GNU Hell|unsupported)'; then : |
36 |
|
else |
37 |
|
echo "$0: cannot execute ../pdemo/helldl" 1>&2 |
38 |
|
status=1 |
39 |
|
fi |
40 |
|
|
41 |
|
exit $status |