Merge lp:~zorba-coders/zorba/ctest-j8 into lp:zorba

Proposed by Chris Hillery
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11227
Merged at revision: 11236
Proposed branch: lp:~zorba-coders/zorba/ctest-j8
Merge into: lp:zorba
Diff against target: 232 lines (+43/-36)
9 files modified
cmake_modules/GenZorbaRuntime.cmake (+1/-2)
cmake_modules/ZorbaModule.cmake (+8/-0)
test/rbkt/CMakeLists.txt (+0/-5)
test/rbkt/Queries/CMakeLists.txt (+13/-0)
test/rbkt/testdriver.cpp (+0/-8)
test/sax2/CMakeLists.txt (+10/-5)
test/sax2/sax2testdriver.cpp (+0/-5)
test/update/CMakeLists.txt (+11/-7)
test/update/updtestdriver.cpp (+0/-4)
To merge this branch: bzr merge lp:~zorba-coders/zorba/ctest-j8
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Chris Hillery Approve
Review via email: mp+147855@code.launchpad.net

Commit message

Test fixes to ensure all tests can be run in parallel. In particular: create all .res file output directories at CMake time, not in the testdrivers. Also create unique test-gen files for RuntimeGenerator tests.

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/ctest-j8 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job ctest-j8-2013-02-12T08-50-50.202Z is finished. The
  final status was:

  961 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job ctest-j8-2013-02-12T09-32-45.691Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job ctest-j8-2013-02-13T01-32-56.61Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake_modules/GenZorbaRuntime.cmake'
2--- cmake_modules/GenZorbaRuntime.cmake 2012-09-19 21:16:15 +0000
3+++ cmake_modules/GenZorbaRuntime.cmake 2013-02-12 09:33:58 +0000
4@@ -68,8 +68,7 @@
5 # If we are testing the generation, overwrite gen_file with a dummy location.
6 IF(test_only)
7 STRING(REGEX REPLACE "[/\\]" "_" gen_file "${gen_relfilename}")
8- SET(gen_file "${binary_dir}/gen_test.tmp.${gen_file}")
9- MESSAGE(" dobbbling: ${gen_file}")
10+ SET(gen_file "${binary_dir}/test/GenZorbaRuntime/${gen_relfile}")
11 ENDIF(test_only)
12
13
14
15=== modified file 'cmake_modules/ZorbaModule.cmake'
16--- cmake_modules/ZorbaModule.cmake 2012-10-30 08:52:50 +0000
17+++ cmake_modules/ZorbaModule.cmake 2013-02-12 09:33:58 +0000
18@@ -836,9 +836,17 @@
19 # path separator
20 ADD_TEST(${TESTNAME} "${Zorba_TESTDRIVER}"
21 "--rbkt-src" "${TEST_DIR}"
22+ "--rbkt-bin" "${PROJECT_BINARY_DIR}/test/rbkt"
23 "--module-path"
24 "${CMAKE_BINARY_DIR}/URI_PATH/${PATH_SEP}${DEPENDENCY_MODULE_PATH}"
25 "${TESTFILE}")
26+ # Create test results output directory, if it doesn't exist
27+ GET_FILENAME_COMPONENT(_bucket_path "${TESTFILE}" PATH)
28+ SET (_full_bucket_path
29+ "${PROJECT_BINARY_DIR}/test/rbkt/QueryResults/${_bucket_path}")
30+ IF (NOT EXISTS "${_full_bucket_path}")
31+ FILE (MAKE_DIRECTORY "${_full_bucket_path}")
32+ ENDIF (NOT EXISTS "${_full_bucket_path}")
33
34 # On non-Windows, call EXPECTED_FAILURE() for known crashes
35 IF (${_crash_idx} GREATER -1)
36
37=== modified file 'test/rbkt/CMakeLists.txt'
38--- test/rbkt/CMakeLists.txt 2012-09-19 21:16:15 +0000
39+++ test/rbkt/CMakeLists.txt 2013-02-12 09:33:58 +0000
40@@ -15,11 +15,6 @@
41 ADD_SUBDIRECTORY(Scripts)
42 ADD_SUBDIRECTORY(ExpCompilerResults)
43
44-# create the result directory for all tests
45-IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
46- FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
47-ENDIF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
48-
49 # configure the testdriver
50 CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
51
52
53=== modified file 'test/rbkt/Queries/CMakeLists.txt'
54--- test/rbkt/Queries/CMakeLists.txt 2013-01-24 10:49:06 +0000
55+++ test/rbkt/Queries/CMakeLists.txt 2013-02-12 09:33:58 +0000
56@@ -18,6 +18,9 @@
57
58 MESSAGE(STATUS "Adding tests for CTest")
59
60+# Compute results directory for testdriver
61+SET (_results_dir "${CMAKE_CURRENT_BINARY_DIR}/../QueryResults")
62+
63 FILE(GLOB_RECURSE TESTFILES FOLLOW_SYMLINKS
64 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.xq")
65 IF(ZORBA_TEST_XQUERYX)
66@@ -91,6 +94,10 @@
67 # finally add the test
68 ZORBA_ADD_TEST("${TEST_NAME}" testdriver ${CHAINED_TESTS_FILES})
69
70+ # Create directory for output, if it doesn't exit
71+ IF (NOT EXISTS "${_results_dir}/${CT}")
72+ FILE (MAKE_DIRECTORY "${_results_dir}/${CT}")
73+ ENDIF (NOT EXISTS "${_results_dir}/${CT}")
74
75 # clear the list of testfiles, args and also the name of the test
76 SET(CHAINED_TESTS_FILES)
77@@ -197,6 +204,12 @@
78
79 ZORBA_ADD_TEST("${TESTNAME}" testdriver ${TESTFILE})
80
81+ # Create directory for output, if it doesn't exist
82+ GET_FILENAME_COMPONENT(_bucket_path ${TESTFILE} PATH)
83+ IF (NOT EXISTS "${_results_dir}/${_bucket_path}")
84+ FILE (MAKE_DIRECTORY "${_results_dir}/${_bucket_path}")
85+ ENDIF (NOT EXISTS "${_results_dir}/${_bucket_path}")
86+
87 MATH(EXPR TESTCOUNTER ${TESTCOUNTER}+1)
88 MATH(EXPR TESTMOD "${TESTCOUNTER}/1000")
89 IF (${TESTMOD})
90
91=== modified file 'test/rbkt/testdriver.cpp'
92--- test/rbkt/testdriver.cpp 2013-02-08 00:42:44 +0000
93+++ test/rbkt/testdriver.cpp 2013-02-12 09:33:58 +0000
94@@ -216,15 +216,7 @@
95 zorba::file lResultFile (rbkt_bin_dir + "/QueryResults/"
96 + lQueryWithoutSuffix + ".xml.res", path_flags);
97
98- zorba::file lErrorFile (rbkt_bin_dir + "/"
99- + lQueryWithoutSuffix + ".err", path_flags);
100-
101 if ( lResultFile.exists () ) { lResultFile.remove (); }
102- if ( lErrorFile.exists () ) { lErrorFile.remove (); }
103-
104- zorba::file lBucket (lResultFile.branch_path());
105- if ( ! lBucket.exists () )
106- lBucket.deep_mkdir (); // create deep directories
107
108 // Form the full pathname for the .spec file that may be associated
109 // with this query. If the .spec file exists, read its contents to
110
111=== modified file 'test/sax2/CMakeLists.txt'
112--- test/sax2/CMakeLists.txt 2012-09-19 21:16:15 +0000
113+++ test/sax2/CMakeLists.txt 2013-02-12 09:33:58 +0000
114@@ -12,11 +12,6 @@
115 # See the License for the specific language governing permissions and
116 # limitations under the License.
117
118-# create the result directory for all tests
119-IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
120- FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
121-ENDIF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
122-
123 # configure the testdriver
124 CONFIGURE_FILE(sax2testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/sax2testdriverconfig.h)
125
126@@ -31,6 +26,9 @@
127
128 ZORBA_GENERATE_EXE(sax2testdriver "${SAX2_TESTDRIVER_SRCS}" "" "" "")
129
130+# Compute results directory for testdriver
131+SET (_results_dir "${CMAKE_CURRENT_BINARY_DIR}/QueryResults")
132+
133 # collect all queries (suffix .xq) in all subdirectories of the Queries dir
134 FILE(GLOB_RECURSE TESTFILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/Queries/ *.xq)
135
136@@ -45,6 +43,13 @@
137
138 SET (TESTNAME "test/sax2/${TESTNAME}")
139 ZORBA_ADD_TEST(${TESTNAME} sax2testdriver ${TESTFILE})
140+
141+ # Create directory for output, if it doesn't exist
142+ GET_FILENAME_COMPONENT(_bucket_path ${TESTFILE} PATH)
143+ IF (NOT EXISTS "${_results_dir}/${_bucket_path}")
144+ FILE (MAKE_DIRECTORY "${_results_dir}/${_bucket_path}")
145+ ENDIF (NOT EXISTS "${_results_dir}/${_bucket_path}")
146+
147 ZORBA_SET_TEST_PROPERTY (${TESTNAME} TIMEOUT "10")
148
149 MATH(EXPR TESTCOUNTER ${TESTCOUNTER}+1)
150
151=== modified file 'test/sax2/sax2testdriver.cpp'
152--- test/sax2/sax2testdriver.cpp 2012-09-19 21:16:15 +0000
153+++ test/sax2/sax2testdriver.cpp 2013-02-12 09:33:58 +0000
154@@ -303,11 +303,6 @@
155 if ( lResultFile.exists () ) { lResultFile.remove (); }
156 if ( lErrorFile.exists () ) { lErrorFile.remove (); }
157
158- // create the result directory
159- zorba::file lBucket = lResultFile.branch_path();
160- if ( ! lBucket.exists () )
161- lBucket.deep_mkdir ();
162-
163 // we must either have a reference file or an expected error code
164 if ( (! lRefFile.exists ()) || lRefFile.is_directory ())
165 {
166
167=== modified file 'test/update/CMakeLists.txt'
168--- test/update/CMakeLists.txt 2012-09-19 21:16:15 +0000
169+++ test/update/CMakeLists.txt 2013-02-12 09:33:58 +0000
170@@ -12,11 +12,6 @@
171 # See the License for the specific language governing permissions and
172 # limitations under the License.
173
174-# create the result directory for all tests
175-IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
176- FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
177-ENDIF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/QueryResults/)
178-
179 # configure the testdriver
180 CONFIGURE_FILE(testdriverconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/testdriverconfig.h)
181
182@@ -40,6 +35,9 @@
183 MESSAGE(STATUS "Adding update tests for CTest")
184 SET(TESTCOUNTER 0)
185
186+# Compute results directory for updtestdriver
187+SET (_results_dir "${CMAKE_CURRENT_BINARY_DIR}/QueryResults")
188+
189 FOREACH(TESTFILE ${TESTFILES})
190
191 STRING(LENGTH ${TESTFILE} TESTFILELENGTH)
192@@ -56,10 +54,16 @@
193
194 ZORBA_ADD_TEST("${TESTNAME}" updtestdriver ${TESTFILE})
195
196+ # Create directory for output, if it doesn't exist
197+ GET_FILENAME_COMPONENT(_bucket_path ${TESTFILE} PATH)
198+ IF (NOT EXISTS "${_results_dir}/${_bucket_path}")
199+ FILE (MAKE_DIRECTORY "${_results_dir}/${_bucket_path}")
200+ ENDIF (NOT EXISTS "${_results_dir}/${_bucket_path}")
201+
202 MATH(EXPR TESTCOUNTER ${TESTCOUNTER}+1)
203- MATH(EXPR TESTMOD "${TESTCOUNTER}/100")
204+ MATH(EXPR TESTMOD "${TESTCOUNTER}/500")
205 IF (${TESTMOD})
206- MESSAGE(STATUS "Adding another 100 update tests")
207+ MESSAGE(STATUS "Adding another 500 update tests")
208 SET(TESTCOUNTER 0)
209 ENDIF (${TESTMOD})
210
211
212=== modified file 'test/update/updtestdriver.cpp'
213--- test/update/updtestdriver.cpp 2013-02-08 00:42:44 +0000
214+++ test/update/updtestdriver.cpp 2013-02-12 09:33:58 +0000
215@@ -252,8 +252,6 @@
216
217 std::string lResultFileString = binDir+"/QueryResults/"+lSpecNoSuffix+".res";
218 zorba::file lResultFile(lResultFileString, flags);
219- if (!lResultFile.exists())
220- zorba::file(lResultFile.branch_path()).deep_mkdir();
221
222 std::string lRefFileString = srcDir+"/ExpectedTestResults/"+lSpecNoSuffix+".xml.res";
223 zorba::file lRefFile(lRefFileString, flags);
224@@ -267,8 +265,6 @@
225
226 std::auto_ptr<zorba::TestSchemaURIMapper> smapper;
227
228- std::vector<zorba::XQuery_t> lQueries;
229-
230 ulong numQueries = (ulong)lSpec.theStates.size();
231
232 //

Subscribers

People subscribed via source and target branches