This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  689a431e907879bc181ac450af0dde56c4c6c5a9 (commit)
       via  cb851a7c1285537ef9e6cee174a49000e047bee9 (commit)
      from  760279161ce7c614fc1d95d70979d5046a3fbecf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=689a431e907879bc181ac450af0dde56c4c6c5a9
commit 689a431e907879bc181ac450af0dde56c4c6c5a9
Merge: 7602791 cb851a7
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Sep 20 16:08:10 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Tue Sep 20 16:08:10 2016 -0400

    Merge topic 'runcmake-cpack-test-framework-fix' into next
    
    cb851a7c Tests: Fix RunCMake.CPack test infrastructure after logical 
conflict


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb851a7c1285537ef9e6cee174a49000e047bee9
commit cb851a7c1285537ef9e6cee174a49000e047bee9
Author:     Domen Vrankar <domen.vran...@gmail.com>
AuthorDate: Tue Sep 20 21:08:36 2016 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Sep 20 16:05:41 2016 -0400

    Tests: Fix RunCMake.CPack test infrastructure after logical conflict
    
    The changes in commit d9cec8ad (CPack/RPM: Generate source rpm (SRPM)
    packages on demand, 2016-09-19) logically conflict with the
    infrastructure updates in commit 4682b42b (Tests: Add subtest support to
    RunCMake/CPack infrastructure, 2016-09-13).  Integrate the two changes
    so they work together.

diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake 
b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
index 7c2c9c6..7e6b4b1 100644
--- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake
+++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake
@@ -1,72 +1,6 @@
 cmake_policy(SET CMP0057 NEW)
-function(run_cpack_test_common_for_merge_ TEST_NAME types build source)
-  if(TEST_TYPE IN_LIST types)
-    set(RunCMake_TEST_NO_CLEAN TRUE)
-    set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
-
-     # TODO this should be executed only once per ctest run (not per generator)
-    file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
-    file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
-    if(EXISTS 
"${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
-      
include("${RunCMake_SOURCE_DIR}/${TEST_TYPE}/${TEST_NAME}-Prerequirements.cmake")
-
-      set(FOUND_PREREQUIREMENTS false)
-      get_test_prerequirements("FOUND_PREREQUIREMENTS"
-          "${TEST_CONFIG_DIR}/${type}_config.cmake")
-
-      # skip the test if prerequirements are not met
-      if(NOT FOUND_PREREQUIREMENTS)
-        message(STATUS "${TEST_NAME} - SKIPPED")
-        return()
-      endif()
-    endif()
-
-    # execute cmake
-    set(RunCMake_TEST_OPTIONS "-DGENERATOR_TYPE=${TEST_TYPE}")
-    run_cmake(${TEST_NAME})
-
-    # execute optional build step
-    if(build)
-      run_cmake_command(${TEST_NAME}-Build "${CMAKE_COMMAND}" --build 
"${RunCMake_TEST_BINARY_DIR}")
-    endif()
-
-    if(source)
-      set(pack_params_ -G ${TEST_TYPE} --config ./CPackSourceConfig.cmake)
-      FILE(APPEND ${RunCMake_TEST_BINARY_DIR}/CPackSourceConfig.cmake
-        "\nset(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS 
\"-DRunCMake_TEST:STRING=${TEST_NAME}\")")
-    else()
-      unset(pack_params_)
-    endif()
 
-    # execute cpack
-    execute_process(
-      COMMAND ${CMAKE_CPACK_COMMAND} ${pack_params_}
-      WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
-      RESULT_VARIABLE "result_"
-      OUTPUT_FILE "${RunCMake_TEST_BINARY_DIR}/test_output.txt"
-      ERROR_FILE "${RunCMake_TEST_BINARY_DIR}/test_error.txt"
-      )
-
-    # verify result
-    run_cmake_command(
-      ${TEST_TYPE}/${TEST_NAME}
-      "${CMAKE_COMMAND}"
-        -DRunCMake_TEST=${TEST_NAME}
-        -DGENERATOR_TYPE=${TEST_TYPE}
-        -DPACKAGING_RESULT=${result_}
-        "-Dsrc_dir=${RunCMake_SOURCE_DIR}"
-        "-Dbin_dir=${RunCMake_TEST_BINARY_DIR}"
-        "-Dconfig_file=${config_file}"
-        -P "${RunCMake_SOURCE_DIR}/VerifyResult.cmake"
-      )
-  endif()
-endfunction()
-function(run_cpack_source_test TEST_NAME types)
-  run_cpack_test_common_for_merge_("${TEST_NAME}" "${types}" false true)
-endfunction()
-
-function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX)
+function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source)
   if(TEST_TYPE IN_LIST types)
     set(RunCMake_TEST_NO_CLEAN TRUE)
     set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/${TEST_NAME}-build")
@@ -106,10 +40,19 @@ function(run_cpack_test_common_ TEST_NAME types build 
SUBTEST_SUFFIX)
       run_cmake_command(${full_test_name_}-Build "${CMAKE_COMMAND}" --build 
"${RunCMake_TEST_BINARY_DIR}")
     endif()
 
+    if(source)
+      set(pack_params_ -G ${TEST_TYPE} --config ./CPackSourceConfig.cmake)
+      FILE(APPEND ${RunCMake_TEST_BINARY_DIR}/CPackSourceConfig.cmake
+        "\nset(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS 
\"-DRunCMake_TEST:STRING=${full_test_name_}\ 
-DRunCMake_TEST_FILE_PREFIX:STRING=${TEST_NAME}\")")
+    else()
+      unset(pack_params_)
+    endif()
+
     # execute cpack
     execute_process(
-      COMMAND "${CMAKE_CPACK_COMMAND}"
+      COMMAND ${CMAKE_CPACK_COMMAND} ${pack_params_}
       WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
+      RESULT_VARIABLE "result_"
       OUTPUT_FILE "${RunCMake_TEST_BINARY_DIR}/test_output.txt"
       ERROR_FILE "${RunCMake_TEST_BINARY_DIR}/test_error.txt"
       )
@@ -139,11 +82,15 @@ function(run_cpack_test_common_ TEST_NAME types build 
SUBTEST_SUFFIX)
 endfunction()
 
 function(run_cpack_test TEST_NAME types build)
-  run_cpack_test_common_("${TEST_NAME}" "${types}" "${build}" "")
+  run_cpack_test_common_("${TEST_NAME}" "${types}" "${build}" "" false)
+endfunction()
+
+function(run_cpack_source_test TEST_NAME types build)
+  run_cpack_test_common_("${TEST_NAME}" "${types}" "${build}" "" true)
 endfunction()
 
 function(run_cpack_test_subtests TEST_NAME SUBTEST_SUFFIXES types build)
   foreach(suffix_ IN LISTS SUBTEST_SUFFIXES)
-    run_cpack_test_common_("${TEST_NAME}" "${types}" "${build}" "${suffix_}")
+    run_cpack_test_common_("${TEST_NAME}" "${types}" "${build}" "${suffix_}" 
false)
   endforeach()
 endfunction()

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to