From: <ai...@us...> - 2013-11-14 19:56:38
|
Revision: 12697 http://sourceforge.net/p/plplot/code/12697 Author: airwin Date: 2013-11-14 19:56:31 +0000 (Thu, 14 Nov 2013) Log Message: ----------- Add the test_tclsh_standard_examples target to automate the tclsh TEA-based testing that is mentioned in examples/tcl/README.tcldemos. Make the test_interactive target depend on this new target so this new test will be done automatically whenever the test_interactive target is run. Tested by Alan W. Irwin <ai...@us...> on Linux using the test_tclsh_standard_examples target in the build tree. I did this from a scratch build to demonstrate that all dependencies of this test were handled correctly. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/tcl/CMakeLists.txt Added Paths: ----------- trunk/examples/tcl/tclsh_standard_examples.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-14 07:54:24 UTC (rev 12696) +++ trunk/examples/CMakeLists.txt 2013-11-14 19:56:31 UTC (rev 12697) @@ -873,19 +873,11 @@ endif(ENABLE_pygcw) if(ENABLE_tcl AND PLD_xwin) - if(CORE_BUILD) - add_custom_target(test_tcl_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/standard_examples -dev xwin -np - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl - ) - else(CORE_BUILD) - add_custom_target(test_tcl_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/standard_examples -dev xwin -np - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl - ) - endif(CORE_BUILD) + add_custom_target(test_tcl_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/standard_examples -dev xwin -np + DEPENDS ${xwin_target} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl + ) add_dependencies(test_tcl_standard_examples pltcl tcl_examples @@ -897,6 +889,22 @@ endif(FILE_DEPENDS_xwin) list(APPEND interactive_targets_LIST test_tcl_standard_examples) + add_custom_target(test_tclsh_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/tclsh_standard_examples + DEPENDS ${xwin_target} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl + ) + add_dependencies(test_tclsh_standard_examples + pltcl + tcl_examples + tclIndex_tcl + xwin + ) + if(FILE_DEPENDS_xwin) + add_dependencies(test_tclsh_standard_examples test_xwin_dyndriver) + endif(FILE_DEPENDS_xwin) + list(APPEND interactive_targets_LIST test_tclsh_standard_examples) + endif(ENABLE_tcl AND PLD_xwin) if(ENABLE_tk AND PLD_tk) Modified: trunk/examples/tcl/CMakeLists.txt =================================================================== --- trunk/examples/tcl/CMakeLists.txt 2013-11-14 07:54:24 UTC (rev 12696) +++ trunk/examples/tcl/CMakeLists.txt 2013-11-14 19:56:31 UTC (rev 12697) @@ -85,6 +85,21 @@ @ONLY ) +# tclsh_standard_examples is a configured shell script that runs all +# the standard examples under tclsh use a TEA-based approach. +# pkgIndex_LOCATION is the directory where the relevant pkgIndex.tcl +# file is located. +if(CORE_BUILD) + set(pkgIndex_LOCATION ${CMAKE_BINARY_DIR}/bindings/tcl) +else(CORE_BUILD) + set(pkgIndex_LOCATION ${DATA_DIR}) +endif(CORE_BUILD) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/tclsh_standard_examples.in + ${CMAKE_CURRENT_BINARY_DIR}/tclsh_standard_examples + @ONLY + ) + # Copy file and scripts to the binary directory if different to the # source directory. Needed for ctest, but also so the tclIndex file # is generated in the binary tree not the source tree. @@ -120,7 +135,7 @@ ) install(FILES ${tcl_FILES} DESTINATION ${DATA_DIR}/examples/tcl) - install(PROGRAMS ${tcl_SCRIPTS} standard_examples.in + install(PROGRAMS ${tcl_SCRIPTS} standard_examples.in tclsh_standard_examples.in DESTINATION ${DATA_DIR}/examples/tcl ) Added: trunk/examples/tcl/tclsh_standard_examples.in =================================================================== --- trunk/examples/tcl/tclsh_standard_examples.in (rev 0) +++ trunk/examples/tcl/tclsh_standard_examples.in 2013-11-14 19:56:31 UTC (rev 12697) @@ -0,0 +1,48 @@ +#!@SH_EXECUTABLE@ +# Examples 14 and 31 left out - see Tk standard_examples.in +# Choose the xwin device below (after plinit) +# Note the backslash at the end - this causes Tcl to ignore +# the next line. It becomes a valid Tcl script as well as +# valid shell script +# \ +@TCL_TCLSH@ <<EOF +lappend auto_path @pkgIndex_LOCATION@ +package require Pltcl +source tcldemos.tcl +plsdev "xwin" +plinit +plspause 0 +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +15 +16 +17 +18 +19 +20 +plspause 0 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +33 +exit +EOF Property changes on: trunk/examples/tcl/tclsh_standard_examples.in ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |