Merge lp:~zorba-coders/zorba/threads into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Merged at revision: 11646
Proposed branch: lp:~zorba-coders/zorba/threads
Merge into: lp:zorba
Diff against target: 125 lines (+24/-10)
4 files modified
src/compiler/expression/expr_type.cpp (+7/-0)
test/driver/testdriver_comparator.cpp (+4/-3)
test/driver/testdriver_mt.cpp (+13/-6)
test/rbkt/Queries/w3c_known_failures.txt (+0/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/threads
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+188554@code.launchpad.net

Commit message

fixed a failing PathExpr test in XQTS

Description of the change

fixed a failing PathExpr test in XQTS

To post a comment you must log in.
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/threads/+merge/188554

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

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

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/compiler/expression/expr_type.cpp'
2--- src/compiler/expression/expr_type.cpp 2013-09-23 09:11:02 +0000
3+++ src/compiler/expression/expr_type.cpp 2013-10-01 11:12:39 +0000
4@@ -319,6 +319,9 @@
5 stepType = axis_step_type(theSctx,
6 axisStep,
7 static_cast<const NodeXQType*>(stepType.getp()));
8+
9+ if (stepType->is_empty() || stepType->is_none())
10+ break;
11 }
12
13 newType = stepType.getp();
14@@ -1141,6 +1144,10 @@
15 case store::StoreConsts::commentNode:
16 return RTM.COMMENT_TYPE_STAR;
17
18+ case store::StoreConsts::attributeNode:
19+ case store::StoreConsts::documentNode:
20+ return RTM.EMPTY_TYPE;
21+
22 default:
23 ZORBA_ASSERT(false);
24 }
25
26=== modified file 'test/driver/testdriver_comparator.cpp'
27--- test/driver/testdriver_comparator.cpp 2013-05-16 08:22:46 +0000
28+++ test/driver/testdriver_comparator.cpp 2013-10-01 11:12:39 +0000
29@@ -34,7 +34,8 @@
30 /*******************************************************************************
31
32 ********************************************************************************/
33-int canonicalizeAndCompare(const std::string& aComparisonMethod,
34+int canonicalizeAndCompare(
35+ const std::string& aComparisonMethod,
36 const char* aRefFile,
37 const char* aResultFile,
38 std::ostream& aOutput)
39@@ -224,7 +225,7 @@
40 zorba::printFile(aOutput, lCanonicalRefFile);
41
42 aOutput << std::endl << std::endl;
43-
44+#if 0
45 aOutput << "See line " << lLine << ", col " << lCol
46 << " of expected result. " << std::endl;
47 aOutput << "Actual: <";
48@@ -235,7 +236,7 @@
49 aOutput << lRefLine;
50
51 aOutput << ">" << std::endl;
52-
53+#endif
54 return 8;
55 }
56 return 0;
57
58=== modified file 'test/driver/testdriver_mt.cpp'
59--- test/driver/testdriver_mt.cpp 2013-09-26 07:38:44 +0000
60+++ test/driver/testdriver_mt.cpp 2013-10-01 11:12:39 +0000
61@@ -364,6 +364,7 @@
62 }
63 else
64 {
65+#if 0
66 printErrors(errHandler, "Unexpected errors executing query", true, lOutput);
67
68 std::ofstream errFile(errHandler.getErrorFile().c_str());
69@@ -375,6 +376,7 @@
70 errFile << " " << *lIter;
71 }
72 errFile << std::endl;
73+#endif
74 return false;
75 }
76 }
77@@ -539,16 +541,23 @@
78 // in the pathname of the result and error files.
79 resultFilePath = fs::path(queries->theResultsDir) / (relativeQueryFile);
80 resultFilePath = fs::change_extension(resultFilePath, (".res_" + tnoStr));
81+
82+ if (fs::exists(resultFilePath))
83+ fs::remove(resultFilePath);
84+
85+ std::ofstream resFileStream;
86+ createPath(resultFilePath, resFileStream);
87+
88+#if 0
89 errorFilePath = fs::path(queries->theResultsDir) / (relativeQueryFile);
90 errorFilePath = fs::change_extension(errorFilePath, (".err_" + tnoStr));
91
92- if (fs::exists(resultFilePath)) fs::remove(resultFilePath);
93- if (fs::exists(errorFilePath)) fs::remove(errorFilePath);
94+ if (fs::exists(errorFilePath))
95+ fs::remove(errorFilePath);
96
97- std::ofstream resFileStream;
98 std::ofstream errFileStream;
99- createPath(resultFilePath, resFileStream);
100 createPath(errorFilePath, errFileStream);
101+#endif
102
103 queries->theQueryLocks[queryNo]->unlock();
104
105@@ -615,8 +624,6 @@
106 //
107 zorba::XQuery_t query = zorba->createQuery(&errHandler);
108
109- query->registerDiagnosticHandler(&errHandler);
110-
111 //
112 // Compile the query
113 //
114
115=== modified file 'test/rbkt/Queries/w3c_known_failures.txt'
116--- test/rbkt/Queries/w3c_known_failures.txt 2013-07-02 09:58:23 +0000
117+++ test/rbkt/Queries/w3c_known_failures.txt 2013-10-01 11:12:39 +0000
118@@ -52,7 +52,6 @@
119 test/rbkt/w3c_testsuite/XQuery/Functions/HigherOrder/Map/map-005
120 test/rbkt/w3c_testsuite/XQuery/Functions/HigherOrder/Map/map-007
121 test/rbkt/w3c_testsuite/XQuery/Functions/HigherOrder/Map/map-003
122-test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Axes/K2-Axes-86
123 test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Axes/K2-Axes-52
124 test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFunctions/ST-Data001
125 test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFLWORExpr/ST-PITest-02

Subscribers

People subscribed via source and target branches