|
From: <sm...@us...> - 2009-03-09 22:58:30
|
Revision: 9696
http://plplot.svn.sourceforge.net/plplot/?rev=9696&view=rev
Author: smekal
Date: 2009-03-09 22:58:23 +0000 (Mon, 09 Mar 2009)
Log Message:
-----------
Test scripts for testing D examples. One needs to touch plplot_test/x01d.psc in the cmake build directory so that the D examples are also compared, since the x01 examples is missing so far.
Modified Paths:
--------------
trunk/plplot_test/CMakeLists.txt
trunk/plplot_test/plplot-test.sh.cmake
trunk/plplot_test/test_diff.sh.in
Added Paths:
-----------
trunk/plplot_test/test_d.sh.in
Modified: trunk/plplot_test/CMakeLists.txt
===================================================================
--- trunk/plplot_test/CMakeLists.txt 2009-03-09 22:23:53 UTC (rev 9695)
+++ trunk/plplot_test/CMakeLists.txt 2009-03-09 22:58:23 UTC (rev 9696)
@@ -172,7 +172,19 @@
)
endif(ENABLE_lua)
- # Run C examples with different drivers
+ if(ENABLE_d)
+ configure_file(
+ test_d.sh.in
+ ${CMAKE_CURRENT_BINARY_DIR}/test_d.sh
+ @ONLY
+ )
+ list(APPEND SCRIPTS test_d.sh)
+ add_test(examples_d
+ ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=d"
+ )
+ endif(ENABLE_d)
+
+# Run C examples with different drivers
if(PLD_psc)
if (NOT TEST_DEVICE STREQUAL "psc")
add_test(examples_psttfc
Modified: trunk/plplot_test/plplot-test.sh.cmake
===================================================================
--- trunk/plplot_test/plplot-test.sh.cmake 2009-03-09 22:23:53 UTC (rev 9695)
+++ trunk/plplot_test/plplot-test.sh.cmake 2009-03-09 22:58:23 UTC (rev 9696)
@@ -47,7 +47,7 @@
Options:
[--device=DEVICE] (DEVICE = any cmake-enabled device. psc is the default)
- [--front-end=FE] (FE = one of c, cxx, f77, f95 java, octave, python, tcl, perl, ada, ocaml, or lua)
+ [--front-end=FE] (FE = one of c, cxx, f77, f95 java, octave, python, tcl, perl, ada, ocaml, lua or d)
If this option is not specified, then all front-ends will
be tested. More than one front-end may be given, like
this --front-end="c cxx"
@@ -115,6 +115,7 @@
-o $i = "ada" \
-o $i = "ocaml" \
-o $i = "lua" \
+ -o $i = "d" \
] \
|| usage 0 1>&2
done
@@ -169,6 +170,7 @@
adadir=$EXAMPLES_DIR/ada
ocamldir=$EXAMPLES_DIR/ocaml
luadir=$EXAMPLES_DIR/lua
+ddir=$EXAMPLES_DIR/d
octave=@OCTAVE@
octavedir=\
$EXAMPLES_DIR/../bindings/octave:\
@@ -182,7 +184,7 @@
@OCTAVE_M_DIR@/PLplot:\
@OCTAVE_OCT_DIR@:
PATH=$EXAMPLES_DIR/../utils:@BIN_DIR@:$PATH
-export cdir cxxdir f77dir f95dir pythondir javadir octave octavedir tcldir perldir adadir ocamldir luadir PATH
+export cdir cxxdir f77dir f95dir pythondir javadir octave octavedir tcldir perldir adadir ocamldir luadir ddir PATH
fe=""
@@ -304,6 +306,7 @@
test "@ENABLE_ada@" = "ON" && FRONT_END="$FRONT_END ada"
test "@ENABLE_ocaml@" = "ON" && FRONT_END="$FRONT_END ocaml"
test "@ENABLE_lua@" = "ON" && FRONT_END="$FRONT_END lua"
+ test "@ENABLE_d@" = "ON" && FRONT_END="$FRONT_END d"
fi
# Find where the front-end scripts are by looking at the directory name of the
Added: trunk/plplot_test/test_d.sh.in
===================================================================
--- trunk/plplot_test/test_d.sh.in (rev 0)
+++ trunk/plplot_test/test_d.sh.in 2009-03-09 22:58:23 UTC (rev 9696)
@@ -0,0 +1,57 @@
+#!@SH_EXECUTABLE@
+# Test suite for D examples.
+#
+# Copyright (C) 2009 Werner Smekal
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Library Public License as published
+# by the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# This is called from plplot-test.sh with $ddir, $device, $dsuffix,
+# $options, and possibly $verbose_test defined.
+
+# To build the D examples before running this script do the following:
+# pushd $ddir; make; popd
+
+# Do the standard non-interactive examples.
+lang="d"
+export index lang
+for index in 03 04 05 06 07 08 10 12 13; do
+ if [ "$verbose_test" ] ; then
+ echo "x${index}${lang}"
+ fi
+ if [ "$index" = "14" ] ; then
+ echo ${OUTPUT_DIR}/x${index}a${lang}%n.$dsuffix | \
+ $DEBUG_CMD $ddir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \
+ $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt
+ # Look for any status codes (segfaults, plexit) from the examples themselves.
+ status_code=$?
+ else
+ $DEBUG_CMD $ddir/x${index}${lang} -dev $device -o ${OUTPUT_DIR}/x${index}${lang}%n.$dsuffix \
+ $options 2> test.error >| ${OUTPUT_DIR}/x${index}${lang}_${dsuffix}.txt
+ # Look for any status codes (segfaults, plexit) from the examples themselves.
+ status_code=$?
+ fi
+ cat test.error
+ if [ "$status_code" -ne 0 ] ; then
+ exit $status_code
+ fi
+ # Look for any PLPLOT ERROR messages from plwarn that do not result in an
+ # exit code.
+ is_error=`grep -l 'PLPLOT ERROR' test.error`
+ if [ -n "$is_error" ] ; then
+ exit 1
+ fi
+done
Property changes on: trunk/plplot_test/test_d.sh.in
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/plplot_test/test_diff.sh.in
===================================================================
--- trunk/plplot_test/test_diff.sh.in 2009-03-09 22:23:53 UTC (rev 9695)
+++ trunk/plplot_test/test_diff.sh.in 2009-03-09 22:58:23 UTC (rev 9696)
@@ -25,8 +25,8 @@
xsuffix_c=
# Compare C results with c++, f77, f95, java, octave, python, tcl, perl,
-# ada, ocaml, and lua results
-for lang in c++ f77 f95 java octave python tcl perl ada adathick ocaml lua; do
+# ada, ocaml, lua and d results
+for lang in c++ f77 f95 java octave python tcl perl ada adathick ocaml lua d; do
# Check which suffix is used for this binding
case $lang in
@@ -78,6 +78,10 @@
xsuffix=
suffix=lua
;;
+ d)
+ xsuffix=
+ suffix=d
+ ;;
esac
missing=""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|