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

Proposed by Chris Hillery
Status: Merged
Approved by: Chris Hillery
Approved revision: 11224
Merged at revision: 11224
Proposed branch: lp:~zorba-coders/zorba/ctest-j8
Merge into: lp:zorba
Diff against target: 83 lines (+9/-11)
5 files modified
test/commons/testdriver_comparator.cpp (+7/-5)
test/commons/testdriver_comparator.h (+0/-1)
test/rbkt/testdriver.cpp (+1/-2)
test/rbkt/testdriver_mt.cpp (+0/-1)
test/update/updtestdriver.cpp (+1/-2)
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+147266@code.launchpad.net

Commit message

Create canonicalized ref/result files based on generated resultfile path, so they are always in the binary dir and unique across tests.

To post a comment you must log in.
Revision history for this message
Chris Hillery (ceejatec) :
review: 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-08T01-20-39.373Z 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
=== modified file 'test/commons/testdriver_comparator.cpp'
--- test/commons/testdriver_comparator.cpp 2012-09-19 21:16:15 +0000
+++ test/commons/testdriver_comparator.cpp 2013-02-08 01:13:28 +0000
@@ -34,11 +34,9 @@
34/*******************************************************************************34/*******************************************************************************
3535
36********************************************************************************/36********************************************************************************/
37int canonicalizeAndCompare(37int canonicalizeAndCompare(const std::string& aComparisonMethod,
38 const std::string& aComparisonMethod,
39 const char* aRefFile,38 const char* aRefFile,
40 const char* aResultFile,39 const char* aResultFile,
41 const std::string& aRBKTBinDir,
42 std::ostream& aOutput)40 std::ostream& aOutput)
43{41{
44 xmlDocPtr lRefResult_ptr;42 xmlDocPtr lRefResult_ptr;
@@ -177,8 +175,12 @@
177 return 8;175 return 8;
178 }176 }
179177
180 std::string lCanonicalRefFile = aRBKTBinDir + "/canonical_ref.xml";178 // Form filenames to output canonicalized files based on the *actual* result
181 std::string lCanonicalResFile = aRBKTBinDir + "/canonical_res.xml";179 // filename, since that will be in the build dir and unique to this test
180 std::string lCanonicalRefFile(aResultFile);
181 lCanonicalRefFile.append( ".canonical_ref.xml");
182 std::string lCanonicalResFile(aResultFile);
183 lCanonicalResFile.append(".canonical_res.xml");
182184
183 int lRefResultRes = xmlC14NDocSave(lRefResult_ptr, 0, 0, NULL, 0, lCanonicalRefFile.c_str(), 0);185 int lRefResultRes = xmlC14NDocSave(lRefResult_ptr, 0, 0, NULL, 0, lCanonicalRefFile.c_str(), 0);
184 int lResultRes = xmlC14NDocSave(lResult_ptr, 0, 0, NULL, 0, lCanonicalResFile.c_str(), 0);186 int lResultRes = xmlC14NDocSave(lResult_ptr, 0, 0, NULL, 0, lCanonicalResFile.c_str(), 0);
185187
=== modified file 'test/commons/testdriver_comparator.h'
--- test/commons/testdriver_comparator.h 2012-09-19 21:16:15 +0000
+++ test/commons/testdriver_comparator.h 2013-02-08 01:13:28 +0000
@@ -28,7 +28,6 @@
28canonicalizeAndCompare(const std::string& aComparisonMethod,28canonicalizeAndCompare(const std::string& aComparisonMethod,
29 const char* aRefFile,29 const char* aRefFile,
30 const char* aResultFile,30 const char* aResultFile,
31 const std::string& aRBKTBinDir,
32 std::ostream& = std::cout);31 std::ostream& = std::cout);
3332
34void33void
3534
=== modified file 'test/rbkt/testdriver.cpp'
--- test/rbkt/testdriver.cpp 2012-10-08 12:09:36 +0000
+++ test/rbkt/testdriver.cpp 2013-02-08 01:13:28 +0000
@@ -559,8 +559,7 @@
559 else {559 else {
560 int lCanonicalRes = zorba::canonicalizeAndCompare(lSpec.getComparisonMethod(),560 int lCanonicalRes = zorba::canonicalizeAndCompare(lSpec.getComparisonMethod(),
561 lIter->c_str(),561 lIter->c_str(),
562 lResultFile.c_str(),562 lResultFile.c_str());
563 rbkt_bin_dir);
564 if (lCanonicalRes == 0) 563 if (lCanonicalRes == 0)
565 {564 {
566 std::cout << "testdriver: success (canonical result # " << i 565 std::cout << "testdriver: success (canonical result # " << i
567566
=== modified file 'test/rbkt/testdriver_mt.cpp'
--- test/rbkt/testdriver_mt.cpp 2012-12-14 09:39:17 +0000
+++ test/rbkt/testdriver_mt.cpp 2013-02-08 01:13:28 +0000
@@ -710,7 +710,6 @@
710 int lCanonicalRes = zorba::canonicalizeAndCompare(querySpec.getComparisonMethod(),710 int lCanonicalRes = zorba::canonicalizeAndCompare(querySpec.getComparisonMethod(),
711 refFilePath.c_str(),711 refFilePath.c_str(),
712 resFilePath.c_str(),712 resFilePath.c_str(),
713 rbkt_bin_dir,
714 queries->theOutput);713 queries->theOutput);
715 if (lCanonicalRes == 0)714 if (lCanonicalRes == 0)
716 {715 {
717716
=== modified file 'test/update/updtestdriver.cpp'
--- test/update/updtestdriver.cpp 2012-09-19 21:16:15 +0000
+++ test/update/updtestdriver.cpp 2013-02-08 01:13:28 +0000
@@ -481,8 +481,7 @@
481 int lCanonicalRes =481 int lCanonicalRes =
482 zorba::canonicalizeAndCompare(State::compareTypeStr(lState->theCompareTypes[i]),482 zorba::canonicalizeAndCompare(State::compareTypeStr(lState->theCompareTypes[i]),
483 lRefFile.get_path().c_str(),483 lRefFile.get_path().c_str(),
484 lResultFile.get_path().c_str(),484 lResultFile.get_path().c_str());
485 zorba::UPDATE_BINARY_DIR.c_str());
486 if (lCanonicalRes == 0) 485 if (lCanonicalRes == 0)
487 {486 {
488 anyMatch = true;487 anyMatch = true;

Subscribers

People subscribed via source and target branches