zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #17898
[Merge] lp:~zorba-coders/zorba/ctest-j8 into lp:zorba
Chris Hillery has proposed merging lp:~zorba-coders/zorba/ctest-j8 into lp:zorba.
Commit message:
Create canonicalized ref/result files based on generated resultfile path, so they are always in the binary dir and unique across tests.
Requested reviews:
Chris Hillery (ceejatec)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ctest-j8/+merge/147266
--
https://code.launchpad.net/~zorba-coders/zorba/ctest-j8/+merge/147266
Your team Zorba Coders is subscribed to branch lp:zorba.
=== 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 @@
/*******************************************************************************
********************************************************************************/
-int canonicalizeAndCompare(
- const std::string& aComparisonMethod,
+int canonicalizeAndCompare(const std::string& aComparisonMethod,
const char* aRefFile,
const char* aResultFile,
- const std::string& aRBKTBinDir,
std::ostream& aOutput)
{
xmlDocPtr lRefResult_ptr;
@@ -177,8 +175,12 @@
return 8;
}
- std::string lCanonicalRefFile = aRBKTBinDir + "/canonical_ref.xml";
- std::string lCanonicalResFile = aRBKTBinDir + "/canonical_res.xml";
+ // Form filenames to output canonicalized files based on the *actual* result
+ // filename, since that will be in the build dir and unique to this test
+ std::string lCanonicalRefFile(aResultFile);
+ lCanonicalRefFile.append( ".canonical_ref.xml");
+ std::string lCanonicalResFile(aResultFile);
+ lCanonicalResFile.append(".canonical_res.xml");
int lRefResultRes = xmlC14NDocSave(lRefResult_ptr, 0, 0, NULL, 0, lCanonicalRefFile.c_str(), 0);
int lResultRes = xmlC14NDocSave(lResult_ptr, 0, 0, NULL, 0, lCanonicalResFile.c_str(), 0);
=== 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 @@
canonicalizeAndCompare(const std::string& aComparisonMethod,
const char* aRefFile,
const char* aResultFile,
- const std::string& aRBKTBinDir,
std::ostream& = std::cout);
void
=== 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 @@
else {
int lCanonicalRes = zorba::canonicalizeAndCompare(lSpec.getComparisonMethod(),
lIter->c_str(),
- lResultFile.c_str(),
- rbkt_bin_dir);
+ lResultFile.c_str());
if (lCanonicalRes == 0)
{
std::cout << "testdriver: success (canonical result # " << i
=== 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 @@
int lCanonicalRes = zorba::canonicalizeAndCompare(querySpec.getComparisonMethod(),
refFilePath.c_str(),
resFilePath.c_str(),
- rbkt_bin_dir,
queries->theOutput);
if (lCanonicalRes == 0)
{
=== 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 @@
int lCanonicalRes =
zorba::canonicalizeAndCompare(State::compareTypeStr(lState->theCompareTypes[i]),
lRefFile.get_path().c_str(),
- lResultFile.get_path().c_str(),
- zorba::UPDATE_BINARY_DIR.c_str());
+ lResultFile.get_path().c_str());
if (lCanonicalRes == 0)
{
anyMatch = true;
Follow ups