From: <ai...@us...> - 2013-11-29 01:16:54
|
Revision: 12778 http://sourceforge.net/p/plplot/code/12778 Author: airwin Date: 2013-11-29 01:16:49 +0000 (Fri, 29 Nov 2013) Log Message: ----------- Add many more interactive tests (-dev ntk, pltcl_standard_examples, tclsh_standard_examples, wish_standard_examples, plserver_runAllDemos, and wish_runAllDemos) to traditional (Makefile + pkg-config) build and test of the installed examples tree. Tested by Alan W. Irwin <ai...@us...> on Linux running "make install" for the core build and then changing directory to the installed examples and running "make test_interactive" (which uses the traditional build system for those examples. This was done with all tests mentioned above enabled one-by-one (to deal with some known issues for those tests). For this commit, the ones with the known issues (wish_standard_examples, plserver_runAllDemos, and wish_runAllDemos) have been temporarily disabled until those issues are fixed. Modified Paths: -------------- trunk/plplot_test/CMakeLists.txt trunk/plplot_test/plplot-test-interactive.sh.in Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2013-11-28 19:19:04 UTC (rev 12777) +++ trunk/plplot_test/CMakeLists.txt 2013-11-29 01:16:49 UTC (rev 12778) @@ -50,6 +50,30 @@ @ONLY ) + # Set up optional tests in the configured plplot-test-interactive.sh file. + + set(pkgIndex_LOCATION ${DATA_DIR}) + set(SHELL_TEST_PLTCL_STANDARD_EXAMPLES 1) + set(SHELL_TEST_PLSERVER_STANDARD_EXAMPLES 1) + # FIXME. Currently plserver_runAllDemos needs work so drop it for now. + set(SHELL_TEST_PLSERVER_RUNALLDEMOS 0) + + # All Tcl/Tk tests that use the "package require" approach only + # work with shared libraries. + if(BUILD_SHARED_LIBS) + set(SHELL_TEST_TCLSH_STANDARD_EXAMPLES 1) + # FIXME. Currently wish_standard_examples segfaults on exit. So + # drop it for now. + set(SHELL_TEST_WISH_STANDARD_EXAMPLES 0) + # FIXME. Currently the wish_runAllDemos needs work and also has + # an intermittent bug (x?? not recognized as a command). + set(SHELL_TEST_WISH_RUNALLDEMOS 0) + else(BUILD_SHARED_LIBS) + set(SHELL_TEST_TCLSH_STANDARD_EXAMPLES 0) + set(SHELL_TEST_WISH_STANDARD_EXAMPLES 0) + set(SHELL_TEST_WISH_RUNALLDEMOS 0) + endif(BUILD_SHARED_LIBS) + configure_file( plplot-test-interactive.sh.in ${CMAKE_CURRENT_BINARY_DIR}/plplot-test-interactive.sh Modified: trunk/plplot_test/plplot-test-interactive.sh.in =================================================================== --- trunk/plplot_test/plplot-test-interactive.sh.in 2013-11-28 19:19:04 UTC (rev 12777) +++ trunk/plplot_test/plplot-test-interactive.sh.in 2013-11-29 01:16:49 UTC (rev 12778) @@ -99,6 +99,7 @@ PLD_xwin=@PLD_xwin@ PLD_tk=@PLD_tk@ +PLD_ntk=@PLD_ntk@ PLD_xcairo=@PLD_xcairo@ PLD_gcw=@PLD_gcw@ PLD_wxwidgets=@PLD_wxwidgets@ @@ -108,7 +109,7 @@ # These blank-delimited strings must be consistent with previous configured # list of devices. -POSSIBLE_INTERACTIVE_DEVICES_LIST="xwin tk xcairo gcw wxwidgets qtwidget" +POSSIBLE_INTERACTIVE_DEVICES_LIST="xwin tk ntk xcairo gcw wxwidgets qtwidget" POSSIBLE_DEVICES_LIST="$POSSIBLE_INTERACTIVE_DEVICES_LIST extcairo extqt" # Default DEVICES_LIST is all eligible devices if environment variable @@ -256,6 +257,7 @@ done if [ "@ENABLE_tk@" = "ON" ] ; then + cd "${SRC_EXAMPLES_DIR}"/tcl plserver <<EOF plstdwin . @@ -267,13 +269,156 @@ exit EOF -# Just in case EXAMPLES_DIR is a relative path such as the default ".". - cd .. - cd "${EXAMPLES_DIR}"/tk -# Drop 14 because multiple devices do not seem to work in this context. -# Drop 31 since it produces empty plot (by design). - plserver <<EOF + # Look for any status codes (segfaults or whatever) + status_code=$? + if [ "$status_code" -ne 0 ] ; then + echo "ERROR indicated by status code = $status_code for plgrid example" + OVERALL_STATUS_CODE=$status_code + fi + + # OPTIONAL tests. + TEST_PLTCL_STANDARD_EXAMPLES=@SHELL_TEST_PLTCL_STANDARD_EXAMPLES@ + TEST_TCLSH_STANDARD_EXAMPLES=@SHELL_TEST_TCLSH_STANDARD_EXAMPLES@ + TEST_PLSERVER_STANDARD_EXAMPLES=@SHELL_TEST_PLSERVER_STANDARD_EXAMPLES@ + TEST_WISH_STANDARD_EXAMPLES=@SHELL_TEST_WISH_STANDARD_EXAMPLES@ + TEST_PLSERVER_RUNALLDEMOS=@SHELL_TEST_PLSERVER_RUNALLDEMOS@ + TEST_WISH_RUNALLDEMOS=@SHELL_TEST_WISH_RUNALLDEMOS@ + + if [ "$TEST_PLTCL_STANDARD_EXAMPLES" -ne 0 ] ; then + # Copied almost entirely from pltcl_standard_examples script. + cd .. + # Just in case EXAMPLES_DIR is a relative path such as the default ".". + cd "${EXAMPLES_DIR}"/tcl + # Drop 14 because multiple devices do not seem to work in this context. + # Drop 31 since it produces empty plot (by design). + # Drop 32 since it has not been propagated (for the present by + # design) from C. + pltcl <<EOF +source tcldemos.tcl +plsdev "xwin" +plinit +# Disable pausing. +plspause 0 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +#14 +15 +16 +17 +18 +19 +20 +plspause 0 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +#31 +#32 +33 +exit +EOF + # Look for any status codes (segfaults or whatever) + status_code=$? + if [ "$status_code" -ne 0 ] ; then + echo "ERROR indicated by status code = $status_code for pltcl_standard_examples." + OVERALL_STATUS_CODE=$status_code + fi + fi + + if [ "$TEST_TCLSH_STANDARD_EXAMPLES" -ne 0 ] ; then + # Copied almost entirely from TCLSH_standard_examples script. + cd .. + # Just in case EXAMPLES_DIR is a relative path such as the default ".". + cd "${EXAMPLES_DIR}"/tcl + # Drop 14 because multiple devices do not seem to work in this context. + # Drop 31 since it produces empty plot (by design). + # Drop 32 since it has not been propagated (for the present by + # design) from C. + tclsh <<EOF +lappend auto_path @pkgIndex_LOCATION@ +package require Pltcl +source tcldemos.tcl +plsdev "xwin" +plinit +# Disable pausing. +plspause 0 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +#14 +15 +16 +17 +18 +19 +20 +plspause 0 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +#31 +#32 +33 +exit +EOF + # Look for any status codes (segfaults or whatever) + status_code=$? + if [ "$status_code" -ne 0 ] ; then + echo "ERROR indicated by status code = $status_code for tclsh_standard_examples." + OVERALL_STATUS_CODE=$status_code + fi + fi + + if [ "$TEST_PLSERVER_STANDARD_EXAMPLES" -ne 0 ] ; then + # Copied almost entirely from plserver_standard_examples script. + cd .. + # Just in case EXAMPLES_DIR is a relative path such as the default ".". + cd "${EXAMPLES_DIR}"/tk + # Drop 14 because multiple devices do not seem to work in this context. + # Drop 31 since it produces empty plot (by design). + # Drop 32 since it has not been propagated (for the present by + # design) from C. + plserver <<EOF source tkdemos.tcl +plw::set_pause .plw 0 +0 1 2 3 @@ -287,6 +432,7 @@ 11 12 13 +#14 15 16 17 @@ -303,9 +449,116 @@ 28 29 30 +#31 +#32 +33 exit EOF + # Look for any status codes (segfaults or whatever) + status_code=$? + if [ "$status_code" -ne 0 ] ; then + echo "ERROR indicated by status code = $status_code for plserver_standard_examples" + OVERALL_STATUS_CODE=$status_code + fi + fi + if [ "$TEST_WISH_STANDARD_EXAMPLES" -ne 0 ] ; then + # Copied almost entirely from wish_standard_examples script. + cd .. + # Just in case EXAMPLES_DIR is a relative path such as the default ".". + cd "${EXAMPLES_DIR}"/tk + # Drop 14 because multiple devices do not seem to work in this context. + # Drop 31 since it produces empty plot (by design). + # Drop 32 since it has not been propagated (for the present by + # design) from C. + # Both examples 2 ("Couldn't parse color 76") and 24 ("illegal + # number of colors in cmap0: red") error out so we comment out + # those examples for now. Example 20 enables plspause so + # we comment that out for now. + wish <<EOF +lappend auto_path @pkgIndex_LOCATION@ +package require Pltk +source tkdemos.tcl +# Note wish currently disables pauses so no special method is +# required to do that (unlike the plserver case). +0 +1 +#2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +#14 +15 +16 +17 +18 +19 +#20 +21 +22 +23 +#24 +25 +26 +27 +28 +29 +30 +#31 +#32 +33 +exit +EOF + # Look for any status codes (segfaults or whatever) + status_code=$? + if [ "$status_code" -ne 0 ] ; then + echo "ERROR indicated by status code = $status_code for wish_standard_examples" + OVERALL_STATUS_CODE=$status_code + fi + fi + + if [ "$TEST_PLSERVER_RUNALLDEMOS" -ne 0 ] ; then + # Copied almost entirely from plserver_runAllDemos script. + cd .. + # Just in case EXAMPLES_DIR is a relative path such as the default ".". + cd "${EXAMPLES_DIR}"/tk + plserver <<EOF +source runAllDemos.tcl +EOF + # Look for any status codes (segfaults or whatever) + status_code=$? + if [ "$status_code" -ne 0 ] ; then + echo "ERROR indicated by status code = $status_code for plserver_runAllDemos." + OVERALL_STATUS_CODE=$status_code + fi + fi + + if [ "$TEST_WISH_RUNALLDEMOS" -ne 0 ] ; then + # Copied almost entirely from wish_runAllDemos script. + cd .. + # Just in case EXAMPLES_DIR is a relative path such as the default ".". + cd "${EXAMPLES_DIR}"/tk + wish <<EOF +lappend auto_path @pkgIndex_LOCATION@ +package require Plplotter +source runAllDemos.tcl +EOF + # Look for any status codes (segfaults or whatever) + status_code=$? + if [ "$status_code" -ne 0 ] ; then + echo "ERROR indicated by status code = $status_code for wish_runAllDemos." + OVERALL_STATUS_CODE=$status_code + fi + fi fi + if [ "$OVERALL_STATUS_CODE" -ne 0 ] ; then echo "A major error occurred for one of the interactive examples" else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |