Author: kkaempf Date: Wed Apr 8 13:34:57 2009 New Revision: 56685 URL: http://svn.opensuse.org/viewcvs/yast?rev=56685&view=rev Log: enable CTest and set up testing infrastructure Added: trunk/ruby-bindings/tests/ trunk/ruby-bindings/tests/CMakeLists.txt trunk/ruby-bindings/tests/ruby/ trunk/ruby-bindings/tests/ruby/CMakeLists.txt trunk/ruby-bindings/tests/ruby/loading.rb Modified: trunk/ruby-bindings/CMakeLists.txt Modified: trunk/ruby-bindings/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/CMakeLists.txt?rev=56685&r1=56684&r2=56685&view=diff ============================================================================== --- trunk/ruby-bindings/CMakeLists.txt (original) +++ trunk/ruby-bindings/CMakeLists.txt Wed Apr 8 13:34:57 2009 @@ -7,7 +7,6 @@ # escape preprocessor, see -DVERSION below cmake_policy(SET CMP0005 OLD) endif(COMMAND cmake_policy) - PROJECT(yast2-ruby-bindings) SET(PACKAGE "yast2-ruby-bindings") @@ -62,6 +61,14 @@ ADD_SUBDIRECTORY(src) # +# -> tests/ +# +INCLUDE(CTest) +ENABLE_TESTING() + +ADD_SUBDIRECTORY(tests) + +# # packaging # SET( RPMNAME "yast2-ruby-bindings" ) Added: trunk/ruby-bindings/tests/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/tests/CMakeLists.txt?rev=56685&view=auto ============================================================================== --- trunk/ruby-bindings/tests/CMakeLists.txt (added) +++ trunk/ruby-bindings/tests/CMakeLists.txt Wed Apr 8 13:34:57 2009 @@ -0,0 +1,11 @@ +# +# CMakeLists.txt for yast2/ruby-bindings/tests +# + +ENABLE_TESTING() + +# Ruby -> YaST tests +ADD_SUBDIRECTORY(ruby) + +# YCP -> Ruby tests +#ADD_SUBDIRECTORY(ycp) Added: trunk/ruby-bindings/tests/ruby/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/tests/ruby/CMakeLists.txt?rev=56685&view=auto ============================================================================== --- trunk/ruby-bindings/tests/ruby/CMakeLists.txt (added) +++ trunk/ruby-bindings/tests/ruby/CMakeLists.txt Wed Apr 8 13:34:57 2009 @@ -0,0 +1,7 @@ +# +# CMakeLists.txt for yast2/ruby-bindings/tests/ruby +# + +ENABLE_TESTING() + +ADD_TEST(bindings_ruby_loading ruby -C ${CMAKE_CURRENT_SOURCE_DIR} loading.rb) Added: trunk/ruby-bindings/tests/ruby/loading.rb URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/tests/ruby/loading.rb?rev=56685&view=auto ============================================================================== --- trunk/ruby-bindings/tests/ruby/loading.rb (added) +++ trunk/ruby-bindings/tests/ruby/loading.rb Wed Apr 8 13:34:57 2009 @@ -0,0 +1,15 @@ +# +# Test loading of the bindings +# + +$:.unshift "../../build/src/ruby" + +# test loading of extension +require 'test/unit' + +class LoadTest < Test::Unit::TestCase + def test_loading + require 'ycp' + assert true + end +end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org