From: <ai...@us...> - 2013-11-15 01:09:39
|
Revision: 12702 http://sourceforge.net/p/plplot/code/12702 Author: airwin Date: 2013-11-15 01:09:36 +0000 (Fri, 15 Nov 2013) Log Message: ----------- Implement test_wish_standard_examples target that executes all the standard examples using wish and PLplot's TEA capabilities. Make this target a dependency of test_interactive. N.B. For some strange reason the display of the plots is currently getting lost when this script is run non-interactively. That is, if you run the script directly or by mentioning it as an argument for the wish command or if it sourced from an interactive wish environment. However, if you run the commands in this script interactively, i.e. cut and paste the script lines directly into a wish environment, the display of the plots is fine! See the current question on the plplot-devel list about how this issue can be fixed. Nevertheless, despite this issue the current test does work in the sense that all the examples run without any error condition. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/tk/CMakeLists.txt trunk/examples/tk/tkdemos.tcl Added Paths: ----------- trunk/examples/tk/wish_standard_examples.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-11-15 00:58:19 UTC (rev 12701) +++ trunk/examples/CMakeLists.txt 2013-11-15 01:09:36 UTC (rev 12702) @@ -964,19 +964,11 @@ endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_plgrid) - if(CORE_BUILD) - add_custom_target(test_tk_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/standard_examples - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk - ) - else(CORE_BUILD) - add_custom_target(test_tk_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/standard_examples - DEPENDS ${xwin_target} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk - ) - endif(CORE_BUILD) + add_custom_target(test_tk_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/standard_examples + DEPENDS ${xwin_target} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk + ) add_dependencies(test_tk_standard_examples plserver tcl_examples @@ -990,6 +982,24 @@ endif(FILE_DEPENDS_xwin) list(APPEND targets_examples_tk test_tk_standard_examples) + add_custom_target(test_wish_standard_examples + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk + ) + add_dependencies(test_wish_standard_examples + plplottcltk${LIB_TAG} + tk + # FIXME, the tkwin dependency is part of the horrible hack to + # allow tkdemos.tcl to distinguish between the plserver and wish + # environments. + tkwin + tcl_examples + tclIndex_tcl + tclIndex_tk + tclIndex_examples_tk + ) + list(APPEND targets_examples_tk test_wish_standard_examples) + if(ENABLE_itk) add_custom_target(test_tk_02 COMMAND xtk02 -f ${CMAKE_CURRENT_BINARY_DIR}/tk/tk02 Modified: trunk/examples/tk/CMakeLists.txt =================================================================== --- trunk/examples/tk/CMakeLists.txt 2013-11-15 00:58:19 UTC (rev 12701) +++ trunk/examples/tk/CMakeLists.txt 2013-11-15 01:09:36 UTC (rev 12702) @@ -142,7 +142,7 @@ # standard_examples is a configured shell script that runs all the standard # examples under plserver. -set(tk_SCRIPTS tk01 tk03 plgrid standard_examples) +set(tk_SCRIPTS tk01 tk03 plgrid standard_examples wish_standard_examples) # The second and fourth Tk examples depend on Itk to work. if(ENABLE_itk) list(APPEND tk_SCRIPTS tk02 tk04) @@ -181,6 +181,19 @@ # Provide locations for several tk-related targets that will be used # to configure the tk_SCRIPTS. + + # wish_standard_examples is a configured shell script that runs all + # the standard examples under wish using a TEA-based approach. + # pkgIndex_LOCATION is the directory where the relevant pkgIndex.tcl + # file is located. FIXME! use two directories temporarily as + # part of the horrible hack currently allowing tkdemos to distinguish + # between the plserver and wish environments. + if(CORE_BUILD) + set(pkgIndex_LOCATION "${CMAKE_BINARY_DIR}/bindings/tk-x-plat ${CMAKE_BINARY_DIR}/bindings/tk") + else(CORE_BUILD) + set(pkgIndex_LOCATION ${DATA_DIR}) + endif(CORE_BUILD) + foreach(tk_related_target xtk01 plserver xtk02 xtk04) if(TARGET ${tk_related_target}) get_target_property(${tk_related_target}_LOCATION Modified: trunk/examples/tk/tkdemos.tcl =================================================================== --- trunk/examples/tk/tkdemos.tcl 2013-11-15 00:58:19 UTC (rev 12701) +++ trunk/examples/tk/tkdemos.tcl 2013-11-15 01:09:36 UTC (rev 12702) @@ -74,6 +74,8 @@ proc $i {} " global plwin $demo $plwin + # Disable pausing (currently only does that for the wish version) + $plwin cmd plspause 0 $plwin cmd plcol0 1 $plwin cmd plsori 0 $plwin cmd plspal0 cmap0_default.pal Added: trunk/examples/tk/wish_standard_examples.in =================================================================== --- trunk/examples/tk/wish_standard_examples.in (rev 0) +++ trunk/examples/tk/wish_standard_examples.in 2013-11-15 01:09:36 UTC (rev 12702) @@ -0,0 +1,51 @@ +#!@SH_EXECUTABLE@ +# Run standard examples using wish TEA-based approach. +# Drop examples 14 and 31 because querying for devices does not +# seem to work in this context. +# We use of the wish -colormap new option since it cannot hurt, +# but this does not solve color issues +# for both examples 2 ("Couldn't parse color 76") and 24 ("illegal number of colors in cmap0: red") so we comment out those examples for now. +# Example 20 enables plspause so comment out for now. +# The following exec command reexecutes the script under wish. This +# is possible because all comment lines are ignored by wish including +# continued ones with a trailing backslash like this one \ +exec @TK_WISH@ "$0" "$@" +lappend auto_path @pkgIndex_LOCATION@ +package require Pltk +source tkdemos.tcl +# disable pauses +$plwin cmd plspause 0 +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 +33 +exit Property changes on: trunk/examples/tk/wish_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. |