2
# Test suite for f77 examples.
4
# Copyright (C) 2004 Alan W. Irwin
5
# Copyright (C) 2004 Andrew Ross
7
# This file is part of PLplot.
9
# PLplot is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU Library General Public License as published
11
# by the Free Software Foundation; either version 2 of the License, or
12
# (at your option) any later version.
14
# PLplot is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU Library General Public License for more details.
19
# You should have received a copy of the GNU Library General Public License
20
# along with PLplot; if not, write to the Free Software
21
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
# This is called from plplot-test.sh with $f77dir, $device, $dsuffix,
24
# $options, and possibly $verbose_test defined.
26
# To build the f77 examples before running this script do the following:
27
# pushd $f77dir; make; popd
31
if [ "yes@HAVE_F77PARSE_CL_TRUE@" = "yes" ] ; then
32
# This stanza only works if fortran has command-line parsing capability.
33
# However, this is the preferred method because it allows access to
34
# command-line parsing of the $options (e.g., familying options for png
35
# and jpeg devices) that have been passed from plplot-test.sh
37
# Do non-standard example 16a because it illustrates plshade functionality
38
# with cmap1 (and also because the result looks nice.)
39
if [ "$verbose_test" ] ; then
43
$DEBUG_CMD "$f77dir"/x16af -dev $device -o "${OUTPUT_DIR}"/x16af%n.$dsuffix $options 2> test.error
46
if [ "$status_code" -ne 0 ] ; then
49
# Look for any PLPLOT ERROR messages from plwarn that do not result in an
51
is_error=`grep -l 'PLPLOT ERROR' test.error`
52
if [ -n "$is_error" ] ; then
56
# Do the standard non-interactive examples.
57
for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 33 ; do
58
if [ "$verbose_test" ] ; then
61
if [ "${index}" = "14" ] ; then
62
echo "${OUTPUT_DIR}"/x${index}a${lang}%n.$dsuffix | \
63
$DEBUG_CMD "$f77dir"/x${index}${lang} -dev $device -o "${OUTPUT_DIR}"/x${index}${lang}%n.$dsuffix \
64
$options 2> test.error >| "${OUTPUT_DIR}"/x${index}${lang}_${dsuffix}.txt
67
$DEBUG_CMD "$f77dir"/x${index}f -dev $device -o "${OUTPUT_DIR}"/x${index}f%n.$dsuffix $options 2> test.error >| "${OUTPUT_DIR}"/x${index}${lang}_${dsuffix}.txt
71
if [ "$status_code" -ne 0 ] ; then
74
# Look for any PLPLOT ERROR messages from plwarn that do not result in an
76
is_error=`grep -l 'PLPLOT ERROR' test.error`
77
if [ -n "$is_error" ] ; then
83
# Fall back to this method if this fortran platform does not have
84
# command-line parsing capability. Command-line $options must be ignored
86
# Do non-standard example 16a because it illustrates plshade functionality
87
# with cmap1 (and also because the result looks nice.)
88
if [ "$verbose_test" ] ; then
91
$DEBUG_CMD "$f77dir"/x16af <<EOF 2> test.error >| "${OUTPUT_DIR}"/x${index}${lang}_${dsuffix}.txt
93
"${OUTPUT_DIR}"/x16af%n.$dsuffix
97
if [ "$status_code" -ne 0 ] ; then
100
# Look for any PLPLOT ERROR messages from plwarn that do not result in an
102
is_error=`grep -l 'PLPLOT ERROR' test.error`
103
if [ -n "$is_error" ] ; then
107
# Do the standard non-interactive examples.
108
# skip 17 because it is interactive.
109
for index in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 33 ; do
110
if [ "$verbose_test" ] ; then
113
if [ "$index" = "14" ] ; then
114
$DEBUG_CMD "$f77dir"/x${index}f <<EOF 2> test.error >| "${OUTPUT_DIR}"/x${index}${lang}_${dsuffix}.txt
116
"${OUTPUT_DIR}"/x${index}f%n.$dsuffix
118
"${OUTPUT_DIR}"/x${index}af%n.$dsuffix
122
$DEBUG_CMD "$f77dir"/x${index}f <<EOF 2> test.error >| "${OUTPUT_DIR}"/x${index}${lang}_${dsuffix}.txt
124
"${OUTPUT_DIR}"/x${index}f%n.$dsuffix
129
if [ "$status_code" -ne 0 ] ; then
132
# Look for any PLPLOT ERROR messages from plwarn that do not result in an
134
is_error=`grep -l 'PLPLOT ERROR' test.error`
135
if [ -n "$is_error" ] ; then