[Cmake-commits] [cmake-commits] zach.mullen committed CMakeLists.txt 1.1 1.2 lockFile.c NONE 1.1 lockFile.cxx 1.1 NONE
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Sep 23 11:38:40 EDT 2009
Update of /cvsroot/CMake/CMake/Tests/CTestTestParallel
In directory public:/mounts/ram/cvs-serv956/CTestTestParallel
Modified Files:
CMakeLists.txt
Added Files:
lockFile.c
Removed Files:
lockFile.cxx
Log Message:
Set new ctest tests to always run, whether CTEST_TEST_CTEST is enabled or not. Changed parallel test to be portable.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CTestTestParallel/CMakeLists.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CMakeLists.txt 22 Sep 2009 16:05:58 -0000 1.1
--- CMakeLists.txt 23 Sep 2009 15:38:37 -0000 1.2
***************
*** 9,14 ****
SET(CTEST_COMMAND "${CTEST_COMMAND}/ctest")
! ADD_EXECUTABLE (LockFile lockFile.cxx)
! TARGET_LINK_LIBRARIES (NoBuild ${EXTRA_LIBS})
ENABLE_TESTING ()
--- 9,13 ----
SET(CTEST_COMMAND "${CTEST_COMMAND}/ctest")
! ADD_EXECUTABLE (LockFile lockFile.c)
ENABLE_TESTING ()
--- lockFile.cxx DELETED ---
--- NEW FILE: lockFile.c ---
#include <stdio.h>
//if run serially, works fine
//if run in parallel, someone will attempt to delete
//a locked file, which will fail
int main()
{
FILE* file;
int i;
const char* fname = "lockedFile.txt";
file = fopen(fname, "w");
for(i = 0; i < 10000; i++)
{
fprintf(file, "%s", "x");
fflush(file);
}
fclose(file);
return remove(fname);
}
More information about the Cmake-commits
mailing list