Warning, /office/calligraplan/devtools/scripts/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # CMakeLists.txt
0002 # This file runs a python script for conversion of files to ODF formats and validation of the resulting ODF files against RelaxNG
0003 # NOTE! jing.jar has to reside in the same folder as the python script for this to work
0004 # Stores the list of all files from PATH_TO_TEST_FILES in the variable list_of_test_files
0005 
0006 set(PATH_TO_TEST_FILES "" CACHE FILEPATH "This variable is used to set the path to the calligra conversion and validation test files - used under calligra/tools/scripts/")
0007 if ( EXISTS ${PATH_TO_TEST_FILES} )
0008         file(GLOB_RECURSE list_of_test_files RELATIVE ${PATH_TO_TEST_FILES} "${PATH_TO_TEST_FILES}/*")
0009 
0010         foreach(test_file ${list_of_test_files})
0011                 
0012                 if ( NOT ( ${test_file} MATCHES ".*[.]svn.*" ) AND ( ${test_file} MATCHES ".*[.](odt|odp|ods|xls|xlsx|ppt|pptx|doc|dox|txt)$" ))
0013                         string(REGEX REPLACE " " "_" test_name ${test_file})
0014                         add_test("${test_name}_roundtrip" python ${CMAKE_CURRENT_SOURCE_DIR}/convertAndValidateODF.py no ${PATH_TO_TEST_FILES} ${test_file}) 
0015                 endif()
0016         endforeach()
0017 
0018         # Use for cstester
0019         option(ENABLE_CSTESTER_TESTING "Enable testing with cstester" OFF)
0020 
0021         if(ENABLE_CSTESTER_TESTING)
0022                 foreach(test_file ${list_of_test_files})
0023                         if ( NOT ( ${test_file} MATCHES ".*[.]svn.*" ) AND ( ${test_file} MATCHES ".*[.](odt|odp|ods|xls|xlsx|ppt|pptx|doc|dox|txt)$" ) AND NOT ( ${test_file} MATCHES ".*/OpenDocument-v1.1.odt$")  )
0024 
0025                                 add_test(${test_file}_cstester python ${CMAKE_CURRENT_SOURCE_DIR}/run_cstester.py ${PATH_TO_TEST_FILES}/${test_file})
0026                                 set_property(TEST ${test_file}_cstester PROPERTY LABELS cstester)
0027                         endif()
0028                 endforeach()
0029         endif()
0030         
0031 endif()
0032 #EOF