|
From: <got...@us...> - 2009-09-12 13:56:43
|
Revision: 326
http://scstudio.svn.sourceforge.net/scstudio/?rev=326&view=rev
Author: gotthardp
Date: 2009-09-12 13:56:36 +0000 (Sat, 12 Sep 2009)
Log Message:
-----------
Enhanced test scripts to work under Win32.
Fixed file/directory properties.
Modified Paths:
--------------
trunk/tests/CMakeLists.txt
trunk/tests/checker_test.cpp
trunk/tests/z120_test/CMakeLists.txt
trunk/tests/z120_test/z120_diff.py
Property Changed:
----------------
trunk/doc/
trunk/tests/acyclic/
trunk/tests/acyclic/acyclic1.mpr
trunk/tests/acyclic/acyclic1.vsd
trunk/tests/acyclic/acyclic2.mpr
trunk/tests/acyclic/acyclic2.vsd
trunk/tests/acyclic/acyclic3.mpr
trunk/tests/acyclic/acyclic3.vsd
trunk/tests/acyclic/acyclic4.mpr
trunk/tests/acyclic/acyclic4.vsd
trunk/tests/acyclic/acyclic5.mpr
trunk/tests/acyclic/acyclic5.vsd
trunk/tests/acyclic/acyclic6.mpr
trunk/tests/acyclic/acyclic6.vsd
trunk/tests/acyclic/cyclic1.mpr
trunk/tests/acyclic/cyclic1.vsd
trunk/tests/acyclic/cyclic2.mpr
trunk/tests/acyclic/cyclic2.vsd
trunk/tests/acyclic/cyclic3.mpr
trunk/tests/acyclic/cyclic3.vsd
trunk/tests/acyclic/cyclic4.mpr
trunk/tests/acyclic/cyclic4.vsd
trunk/tests/fifo/
trunk/tests/fifo/fifo1.mpr
trunk/tests/fifo/fifo1.vsd
trunk/tests/fifo/fifo2.mpr
trunk/tests/fifo/fifo2.vsd
trunk/tests/fifo/fifo3.mpr
trunk/tests/fifo/fifo3.vsd
trunk/tests/fifo/fifo4.mpr
trunk/tests/fifo/fifo4.vsd
trunk/tests/fifo/fifo5.mpr
trunk/tests/fifo/fifo5.vsd
trunk/tests/fifo/fifo6.mpr
trunk/tests/fifo/fifo6.vsd
trunk/tests/fifo/fifo7.mpr
trunk/tests/fifo/fifo7.vsd
trunk/tests/fifo/nonfifo1.mpr
trunk/tests/fifo/nonfifo1.vsd
trunk/tests/fifo/nonfifo2.mpr
trunk/tests/fifo/nonfifo2.vsd
trunk/tests/local_choice/
trunk/tests/membership/
trunk/tests/z120_test/
Property changes on: trunk/doc
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Modified: trunk/tests/CMakeLists.txt
===================================================================
--- trunk/tests/CMakeLists.txt 2009-09-12 13:52:45 UTC (rev 325)
+++ trunk/tests/CMakeLists.txt 2009-09-12 13:56:36 UTC (rev 326)
@@ -92,16 +92,19 @@
${CMAKE_DL_LIBS}
)
GET_TARGET_PROPERTY(CHECKER_TEST_EXECUTABLE checker_test LOCATION)
+# Replace the "$(IntDir)", "$(OutDir)", or "$(CONFIGURATION)"
+# depending on the generator being used with the test-time variable.
+STRING(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
+ CHECKER_TEST_EXECUTABLE "${CHECKER_TEST_EXECUTABLE}")
SET(CHECKER_SEQUENCE 0)
MACRO(ADD_CHECKER_TEST LIBRARY PROPERTY FILE SATISFIED)
GET_TARGET_PROPERTY(LIBRARY_LOCATION ${LIBRARY} LOCATION)
# Replace the "$(IntDir)", "$(OutDir)", or "$(CONFIGURATION)"
- # depending on the generator being used with the test-time variable.
STRING(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
LIBRARY_LOCATION "${LIBRARY_LOCATION}")
ADD_TEST("checker_test-${CHECKER_SEQUENCE}-${FILE}"
- ${CHECKER_TEST_EXECUTABLE} ${LIBRARY_LOCATION} ${PROPERTY} ${FILE} ${SATISFIED})
+ ${CHECKER_TEST_EXECUTABLE} ${LIBRARY_LOCATION} ${PROPERTY} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} ${SATISFIED})
MATH(EXPR CHECKER_SEQUENCE ${CHECKER_SEQUENCE}+1)
ENDMACRO(ADD_CHECKER_TEST)
Property changes on: trunk/tests/acyclic
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Property changes on: trunk/tests/acyclic/acyclic1.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic1.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic2.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic2.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic3.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic3.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic4.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic4.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic5.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic5.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic6.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/acyclic6.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic1.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic1.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic2.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic2.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic3.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic3.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic4.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/acyclic/cyclic4.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Modified: trunk/tests/checker_test.cpp
===================================================================
--- trunk/tests/checker_test.cpp 2009-09-12 13:52:45 UTC (rev 325)
+++ trunk/tests/checker_test.cpp 2009-09-12 13:56:36 UTC (rev 326)
@@ -153,6 +153,11 @@
z120.save_msc(std::cout, L"counter_example", result);
}
}
+ catch(std::exception &exc)
+ {
+ std::cerr << "ERROR: " << argv[3] << " caused an exception: " << exc.what() << std::endl;
+ errors = 1;
+ }
catch(...)
{
std::cerr << "ERROR: " << argv[3] << " caused an exception" << std::endl;
Property changes on: trunk/tests/fifo
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Property changes on: trunk/tests/fifo/fifo1.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo1.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo2.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo2.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo3.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo3.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo4.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo4.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo5.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo5.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo6.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo6.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo7.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/fifo7.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/nonfifo1.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/nonfifo1.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/nonfifo2.mpr
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/fifo/nonfifo2.vsd
___________________________________________________________________
Deleted: svn:executable
- *
Property changes on: trunk/tests/local_choice
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Property changes on: trunk/tests/membership
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Property changes on: trunk/tests/z120_test
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Modified: trunk/tests/z120_test/CMakeLists.txt
===================================================================
--- trunk/tests/z120_test/CMakeLists.txt 2009-09-12 13:52:45 UTC (rev 325)
+++ trunk/tests/z120_test/CMakeLists.txt 2009-09-12 13:56:36 UTC (rev 326)
@@ -1,3 +1,5 @@
+FIND_PACKAGE(PythonInterp REQUIRED)
+
ADD_EXECUTABLE(z120_test
z120_test.cpp
)
@@ -5,10 +7,16 @@
scZ120
)
+GET_TARGET_PROPERTY(Z120_TEST_EXECUTABLE z120_test LOCATION)
+# Replace the "$(IntDir)", "$(OutDir)", or "$(CONFIGURATION)"
+# depending on the generator being used with the test-time variable.
+STRING(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
+ Z120_TEST_EXECUTABLE "${Z120_TEST_EXECUTABLE}")
+
SET(Z120_SEQUENCE 0)
MACRO(ADD_Z120_TEST FILE SATISFIED)
ADD_TEST("z120_test-${Z120_SEQUENCE}-${FILE}"
- ${EXECUTABLE_OUTPUT_PATH}/z120_diff.py ${FILE} ${SATISFIED})
+ ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/z120_diff.py" "${Z120_TEST_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}" ${SATISFIED})
MATH(EXPR Z120_SEQUENCE ${Z120_SEQUENCE}+1)
ENDMACRO(ADD_Z120_TEST)
Modified: trunk/tests/z120_test/z120_diff.py
===================================================================
--- trunk/tests/z120_test/z120_diff.py 2009-09-12 13:52:45 UTC (rev 325)
+++ trunk/tests/z120_test/z120_diff.py 2009-09-12 13:56:36 UTC (rev 326)
@@ -3,14 +3,14 @@
import difflib
import sys
-p = subprocess.Popen(["./z120_test" , sys.argv[1], sys.argv[2]], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+p = subprocess.Popen([sys.argv[1], sys.argv[2], sys.argv[3]], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-if int(sys.argv[2]) == 0:
+if int(sys.argv[3]) == 0:
exit = p.wait()
sys.exit(exit)
else:
- f = open(sys.argv[1] + ".result", "r+")
+ f = open(sys.argv[2] + ".result", "r+")
result = difflib.unified_diff(f.readlines(), p.stderr.readlines()+ p.stdout.readlines())
@@ -21,3 +21,5 @@
sys.exit(error)
+
+# $Id: z120_test.cpp 298 2009-09-09 20:20:52Z madzin $
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|