Commit 04cb43bb authored by Jan Möbius's avatar Jan Möbius

Added a minimal c++ program execution test. refs #394

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13663 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5743bd22
......@@ -37,26 +37,7 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
# ========================================================================
# ========================================================================
# ========================================================================
# Start OpenFlipper Headless in batch mode, to see if all plugins
# that pretend to be scriptable without ui are correct and the core
# can start
# ========================================================================
ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c )
# Timeout after 60 seconds if we havean endless loop
# Should be run serial to avoid collisons with other instances
# Only one processor required
set_tests_properties (
BatchStart PROPERTIES
TIMEOUT 60
RUN_SERIAL TRUE
PROCESSORS 1
)
# ========================================================================
# ========================================================================
# ========================================================================
......@@ -78,10 +59,27 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/${_local_test_dir})
endforeach ()
# ========================================================================
# ========================================================================
# ========================================================================
# Start OpenFlipper Headless in batch mode, to see if all plugins
# that pretend to be scriptable without ui are correct and the core
# can start
# ========================================================================
# ========================================================================
# ========================================================================
ADD_TEST(BatchStart "${OPENFLIPPER_EXECUTABLE}" -b -c )
# Timeout after 60 seconds if we havean endless loop
# Should be run serial to avoid collisons with other instances
# Only one processor required
set_tests_properties (
BatchStart PROPERTIES
TIMEOUT 60
RUN_SERIAL TRUE
PROCESSORS 1
)
# ========================================================================
# ========================================================================
......
if(BUILD_TESTING)
add_executable (test_example test_example.cc )
add_executable (minimalExecutionTest minimalExecutionTest.cc )
set_target_properties (
test_example PROPERTIES
minimalExecutionTest PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
)
if (WIN32)
add_custom_command (TARGET test_example POST_BUILD
add_custom_command (TARGET minimalExecutionTest POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_if_different
${CMAKE_BINARY_DIR}/tests/${CMAKE_CFG_INTDIR}/test_example.exe
${CMAKE_BINARY_DIR}/tests/test_example.exe)
${CMAKE_BINARY_DIR}/tests/${CMAKE_CFG_INTDIR}/minimalExecutionTest.exe
${CMAKE_BINARY_DIR}/tests/minimalExecutionTest.exe)
endif()
ADD_TEST(NAME "Test_Example"
COMMAND ${CMAKE_BINARY_DIR}/tests/test_example )
ADD_TEST(NAME "Minimal_Execution_Test"
COMMAND ${CMAKE_BINARY_DIR}/tests/minimalExecutionTest )
set_tests_properties(
Test_Example PROPERTIES
set_tests_properties( Minimal_Execution_Test PROPERTIES
TIMEOUT 10
)
......
// C++ Hello World
// C++ Minimal execution test
#include <iostream>
......@@ -6,12 +6,13 @@ class test {
public:
test() {
std::cout << "Constructor" << std::endl;
std::cout << "Constructor Minimal execution test" << std::endl;
};
};
int main()
{
test a;
std::cout << "Hello World!";
std::cout << "Minimal execution test!";
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment