[Cmake-commits] [cmake-commits] king committed CTestUpdateCVS.cmake.in 1.1 1.2 CTestUpdateCommon.cmake 1.2 1.3 CTestUpdateSVN.cmake.in 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Feb 23 15:59:09 EST 2009


Update of /cvsroot/CMake/CMake/Tests
In directory public:/mounts/ram/cvs-serv20407/Tests

Modified Files:
	CTestUpdateCVS.cmake.in CTestUpdateCommon.cmake 
	CTestUpdateSVN.cmake.in 
Log Message:
ENH: Enhance CTest.UpdateCVS/SVN tests

This adds a source tree subdirectory to the content of the test
projects.  It also smoke tests more than one revision worth of changes.


Index: CTestUpdateSVN.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestUpdateSVN.cmake.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CTestUpdateSVN.cmake.in	19 Oct 2008 15:53:01 -0000	1.1
--- CTestUpdateSVN.cmake.in	23 Feb 2009 20:59:07 -0000	1.2
***************
*** 59,63 ****
  # Make changes in the working tree.
  message("Changing content...")
! update_content(user-source files_added files_removed)
  run_child(
    WORKING_DIRECTORY ${TOP}/user-source
--- 59,69 ----
  # Make changes in the working tree.
  message("Changing content...")
! update_content(user-source files_added files_removed dirs_added)
! if(dirs_added)
!   run_child(
!     WORKING_DIRECTORY ${TOP}/user-source
!     COMMAND ${SVNCMD} add ${dirs_added}
!     )
! endif(dirs_added)
  run_child(
    WORKING_DIRECTORY ${TOP}/user-source
***************
*** 78,81 ****
--- 84,100 ----
  
  #-----------------------------------------------------------------------------
+ # Make changes in the working tree.
+ message("Changing content again...")
+ change_content(user-source)
+ 
+ #-----------------------------------------------------------------------------
+ # Commit the changes to the repository.
+ message("Committing revision 3...")
+ run_child(
+   WORKING_DIRECTORY ${TOP}/user-source
+   COMMAND ${SVNCMD} commit -m "Changed content again"
+   )
+ 
+ #-----------------------------------------------------------------------------
  # Go back to before the changes so we can test updating.
  message("Backing up to revision 1...")

Index: CTestUpdateCVS.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestUpdateCVS.cmake.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CTestUpdateCVS.cmake.in	19 Oct 2008 15:53:01 -0000	1.1
--- CTestUpdateCVS.cmake.in	23 Feb 2009 20:59:07 -0000	1.2
***************
*** 58,62 ****
  # Make changes in the working tree.
  message("Changing content...")
! update_content(user-source files_added files_removed)
  run_child(
    WORKING_DIRECTORY ${TOP}/user-source
--- 58,68 ----
  # Make changes in the working tree.
  message("Changing content...")
! update_content(user-source files_added files_removed dirs_added)
! if(dirs_added)
!   run_child(
!     WORKING_DIRECTORY ${TOP}/user-source
!     COMMAND ${CVSCMD} add ${dirs_added}
!     )
! endif(dirs_added)
  run_child(
    WORKING_DIRECTORY ${TOP}/user-source
***************
*** 77,80 ****
--- 83,99 ----
  
  #-----------------------------------------------------------------------------
+ # Make changes in the working tree.
+ message("Changing content again...")
+ change_content(user-source)
+ 
+ #-----------------------------------------------------------------------------
+ # Commit the changes to the repository.
+ message("Committing revision 3...")
+ run_child(
+   WORKING_DIRECTORY ${TOP}/user-source
+   COMMAND ${CVSCMD} commit -m "Changed content again"
+   )
+ 
+ #-----------------------------------------------------------------------------
  # Go back to before the changes so we can test updating.
  message("Backing up to revision 1...")

Index: CTestUpdateCommon.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestUpdateCommon.cmake,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** CTestUpdateCommon.cmake	23 Feb 2009 20:58:44 -0000	1.2
--- CTestUpdateCommon.cmake	23 Feb 2009 20:59:07 -0000	1.3
***************
*** 89,101 ****
  #-----------------------------------------------------------------------------
  # Function to update content.
! function(update_content dir added_var removed_var)
    file(APPEND ${TOP}/${dir}/foo.txt "foo line 2\n")
    file(WRITE ${TOP}/${dir}/zot.txt "zot\n")
    file(REMOVE ${TOP}/${dir}/bar.txt)
!   set(${added_var} zot.txt PARENT_SCOPE)
    set(${removed_var} bar.txt PARENT_SCOPE)
  endfunction(update_content)
  
  #-----------------------------------------------------------------------------
  # Function to write CTestConfiguration.ini content.
  function(create_build_tree src_dir bin_dir)
--- 89,112 ----
  #-----------------------------------------------------------------------------
  # Function to update content.
! function(update_content dir added_var removed_var dirs_var)
    file(APPEND ${TOP}/${dir}/foo.txt "foo line 2\n")
    file(WRITE ${TOP}/${dir}/zot.txt "zot\n")
    file(REMOVE ${TOP}/${dir}/bar.txt)
!   file(MAKE_DIRECTORY ${TOP}/${dir}/subdir)
!   file(WRITE ${TOP}/${dir}/subdir/foo.txt "foo\n")
!   file(WRITE ${TOP}/${dir}/subdir/bar.txt "bar\n")
!   set(${dirs_var} subdir PARENT_SCOPE)
!   set(${added_var} zot.txt subdir/foo.txt subdir/bar.txt PARENT_SCOPE)
    set(${removed_var} bar.txt PARENT_SCOPE)
  endfunction(update_content)
  
  #-----------------------------------------------------------------------------
+ # Function to change existing files
+ function(change_content dir)
+   file(APPEND ${TOP}/${dir}/foo.txt "foo line 3\n")
+   file(APPEND ${TOP}/${dir}/subdir/foo.txt "foo line 2\n")
+ endfunction(change_content)
+ 
+ #-----------------------------------------------------------------------------
  # Function to write CTestConfiguration.ini content.
  function(create_build_tree src_dir bin_dir)
***************
*** 137,141 ****
  
    # Verify the updates reported by CTest.
!   check_updates(${bin_dir} foo.txt bar.txt zot.txt)
  endfunction(run_dashboard_command_line)
  
--- 148,153 ----
  
    # Verify the updates reported by CTest.
!   check_updates(${bin_dir} foo.txt bar.txt zot.txt
!                            subdir/foo.txt subdir/bar.txt)
  endfunction(run_dashboard_command_line)
  
***************
*** 149,153 ****
  
    # Verify the updates reported by CTest.
!   check_updates(dash-binary foo.txt bar.txt zot.txt)
  endfunction(run_dashboard_script)
  
--- 161,166 ----
  
    # Verify the updates reported by CTest.
!   check_updates(dash-binary foo.txt bar.txt zot.txt
!                             subdir/foo.txt subdir/bar.txt)
  endfunction(run_dashboard_script)
  



More information about the Cmake-commits mailing list