Browse Source

- integrated test-target into cmake config

tags/v0.6.0^2
Andreas Romeyke 1 year ago
parent
commit
cb7804d24b
2 changed files with 19 additions and 1 deletions
  1. +7
    -1
      README.testsuite
  2. +12
    -0
      src/CMakeLists.txt

+ 7
- 1
README.testsuite View File

@@ -18,7 +18,13 @@ It needs the following Perl modules (in brackets the debian module):
* Test::More (perl-modules-XXX with XXX as Perl-version )


The call looks like this:
in cmake the test-target is enabled by default, you could run it via:
$> cmake ../src
$> make
$> make test


If you want to call it manually, you should try this instead:

$> cd t/
$> perl -I./ test_grammar.t && echo "fine!"


+ 12
- 0
src/CMakeLists.txt View File

@@ -104,3 +104,15 @@ install(DIRECTORY

file( GLOB README_FILES "../README*" "../FAQ" "../LICENSE" "../TODO" "../BUGS")
install(FILES ${README_FILES} DESTINATION share/checkit_tiff/)

INCLUDE(FindPerl)
if (PERL_FOUND)
enable_testing()
SET(T_DIR ${PROJECT_SOURCE_DIR}/../t )
add_test(NAME grammar COMMAND ${PERL_EXECUTABLE} -I${T_DIR} test_grammar.t WORKING_DIRECTORY ${T_DIR} )
add_test(NAME config COMMAND ${PERL_EXECUTABLE} -I ${T_DIR} test_config_examples.t WORKING_DIRECTORY ${T_DIR} )
add_test(NAME validfiles COMMAND ${PERL_EXECUTABLE} -I ${T_DIR} test_should_pass.t WORKING_DIRECTORY ${T_DIR} )
add_test(NAME invalidfiles COMMAND ${PERL_EXECUTABLE} -I ${T_DIR} test_should_fail.t WORKING_DIRECTORY ${T_DIR} )
else(PERL_FOUND)
MESSAGE(WARN "for testsuite an installed Perl is needed")
endif()

Loading…
Cancel
Save