diff options
author | Sehong Na <sehong.na@samsung.com> | 2014-05-31 12:34:34 +0900 |
---|---|---|
committer | Sehong Na <sehong.na@samsung.com> | 2014-05-31 12:34:34 +0900 |
commit | cc1a12d36421addf6726f86a5b24f913024d8b3a (patch) | |
tree | 253958b9b8d3ffe9120c78cf3bd5389b8e4a0ea0 /Tests/CTestTest | |
download | cmake-cc1a12d36421addf6726f86a5b24f913024d8b3a.tar.gz cmake-cc1a12d36421addf6726f86a5b24f913024d8b3a.tar.bz2 cmake-cc1a12d36421addf6726f86a5b24f913024d8b3a.zip |
Initialize Tizen 2.3tizen_2.3_releasesubmit/tizen_2.3/20150202.102300submit/tizen_2.3/20140531.0637312.3a_releasetizen_2.3
Diffstat (limited to 'Tests/CTestTest')
-rw-r--r-- | Tests/CTestTest/SmallAndFast/CMakeLists.txt | 25 | ||||
-rw-r--r-- | Tests/CTestTest/SmallAndFast/echoargs.c | 11 | ||||
-rw-r--r-- | Tests/CTestTest/SmallAndFast/intentional_compile_error.cxx | 1 | ||||
-rw-r--r-- | Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx | 11 | ||||
-rw-r--r-- | Tests/CTestTest/test.cmake.in | 68 |
5 files changed, 116 insertions, 0 deletions
diff --git a/Tests/CTestTest/SmallAndFast/CMakeLists.txt b/Tests/CTestTest/SmallAndFast/CMakeLists.txt new file mode 100644 index 0000000..85cb30c --- /dev/null +++ b/Tests/CTestTest/SmallAndFast/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 2.8) +project(SmallAndFast) + +include(CTest) + +add_executable(echoargs echoargs.c) +set_property(SOURCE echoargs.c APPEND PROPERTY LABELS SourceLabel Everything) +set_property(TARGET echoargs APPEND PROPERTY LABELS TargetLabel Everything) + +add_test(test0 echoargs) +set_property(TEST test0 APPEND PROPERTY LABELS TestLabel 0ArgTest Everything) + +add_test(test1 echoargs 1) +set_property(TEST test1 APPEND PROPERTY LABELS TestLabel 1ArgTest Everything) + +add_test(test2 echoargs 1 2) +set_property(TEST test2 APPEND PROPERTY LABELS TestLabel 2ArgTest Everything) + +if(SAF_INTENTIONAL_COMPILE_ERROR) + add_executable(ice intentional_compile_error.cxx) +endif() + +if(SAF_INTENTIONAL_COMPILE_WARNING) + add_executable(icw intentional_compile_warning.cxx) +endif() diff --git a/Tests/CTestTest/SmallAndFast/echoargs.c b/Tests/CTestTest/SmallAndFast/echoargs.c new file mode 100644 index 0000000..6e17464 --- /dev/null +++ b/Tests/CTestTest/SmallAndFast/echoargs.c @@ -0,0 +1,11 @@ +#include <stdio.h> + +int main(int argc, const char* argv[]) +{ + int i = 0; + for (; i<argc; ++i) + { + fprintf(stdout, "%s\n", argv[i]); + } + return 0; +} diff --git a/Tests/CTestTest/SmallAndFast/intentional_compile_error.cxx b/Tests/CTestTest/SmallAndFast/intentional_compile_error.cxx new file mode 100644 index 0000000..a8930cf --- /dev/null +++ b/Tests/CTestTest/SmallAndFast/intentional_compile_error.cxx @@ -0,0 +1 @@ +garbage - obviously this should not compile as is diff --git a/Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx b/Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx new file mode 100644 index 0000000..8ea5e40 --- /dev/null +++ b/Tests/CTestTest/SmallAndFast/intentional_compile_warning.cxx @@ -0,0 +1,11 @@ +#include <stdio.h> + +int main(int argc, const char* argv[]) +{ + unsigned int i = 0; // "i<argc" should produce a "signed/unsigned comparison" warning + for (; i<argc; ++i) + { + fprintf(stdout, "%s\n", argv[i]); + } + return 0; +} diff --git a/Tests/CTestTest/test.cmake.in b/Tests/CTestTest/test.cmake.in new file mode 100644 index 0000000..eac5eab --- /dev/null +++ b/Tests/CTestTest/test.cmake.in @@ -0,0 +1,68 @@ +# please see common.cmake for more documentation +################################################################### +# The values in this section must always be provided +################################################################### + +# this is the cvs module name that should be checked out +SET (CTEST_MODULE_NAME SmallAndFast) + +# these are the the name of the source and binary directory on disk. +# They will be appended to DASHBOARD_ROOT +SET (CTEST_SOURCE_NAME SmallAndFast) +SET (CTEST_BINARY_NAME SmallAndFastBuild) + +# which ctest command to use for running the dashboard +SET (CTEST_COMMAND + "\"${CTEST_EXECUTABLE_NAME}\" --version" + "\"${CTEST_EXECUTABLE_NAME}\" -D Experimental -A \"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}\"" + ) + +# what cmake command to use for configuring this dashboard +GET_FILENAME_COMPONENT(CTEST_EXECUTABLE_PATH "${CTEST_EXECUTABLE_NAME}" PATH) +SET(CTEST_CMAKE_COMMAND "\"${CTEST_EXECUTABLE_PATH}/cmake\"") + +MESSAGE("CTest executable: ${CTEST_EXECUTABLE_NAME}") +MESSAGE("CMake executable: ${CTEST_CMAKE_COMMAND}") + +CTEST_SLEEP(1) +CTEST_SLEEP(1 1 1) + +#################################################################### +# The values in this section are optional you can either +# have them or leave them commented out +#################################################################### + +# should ctest wipe the binary tree before running +SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE) + +# this is the initial cache to use for the binary tree, be careful to escape +# any quotes inside of this string if you use it +SET (CTEST_INITIAL_CACHE " +SITE:STRING=@SITE@ +BUILDNAME:STRING=SmallAndFast-@BUILDNAME@ +CMAKE_GENERATOR:INTERNAL=@CMAKE_GENERATOR@ +CMAKE_CXX_FLAGS:STRING=@CMAKE_CXX_FLAGS@ +CMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@ +CMAKE_C_COMPILER:STRING=@CMAKE_C_COMPILER@ +CMAKE_CXX_COMPILER:STRING=@CMAKE_CXX_COMPILER@ +CMAKE_C_COMPILER_ARG1:STRING=@CMAKE_C_COMPILER_ARG1@ +CMAKE_CXX_COMPILER_ARG1:STRING=@CMAKE_CXX_COMPILER_ARG1@ +DART_ROOT:PATH= +MEMORYCHECK_COMMAND:STRING=@MEMORYCHECK_COMMAND@ +MEMORYCHECK_SUPPRESSIONS_FILE:FILEPATH=@MEMORYCHECK_SUPPRESSIONS_FILE@ +MEMORYCHECK_COMMAND_OPTIONS:STRING=@MEMORYCHECK_COMMAND_OPTIONS@ +COVERAGE_COMMAND:FILEPATH=@COVERAGE_COMMAND@ +") + +# if you do not want to use the default location for a +# dashboard then set this variable to the directory +# the dashboard should be in +SET (CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@/Tests/CTestTest") + + +# set any extra envionment varibles here +SET (CTEST_ENVIRONMENT +) + +SET (CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTest/SmallAndFast") +SET (CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTest/${CTEST_BINARY_NAME}") |