Made the crude ability less crude.
authorRoman Donchenko <roman.donchenko@itseez.com>
Tue, 9 Jul 2013 14:57:22 +0000 (18:57 +0400)
committerRoman Donchenko <roman.donchenko@itseez.com>
Wed, 10 Jul 2013 10:58:51 +0000 (14:58 +0400)
modules/ts/include/opencv2/ts/ts.hpp
modules/ts/misc/testlog_parser.py

index fcef589..ea0c979 100644 (file)
@@ -578,6 +578,13 @@ int main(int argc, char **argv) \
     return RUN_ALL_TESTS(); \
 }
 
+// This usually only makes sense in perf tests with several implementations,
+// some of which are not available.
+#define CV_TEST_FAIL_NO_IMPL() do { \
+    ::testing::Test::RecordProperty("custom_status", "noimpl"); \
+    FAIL() << "No equivalent implementation."; \
+} while (0)
+
 #endif
 
 #include "ts_perf.hpp"
index 841ad2e..4ab0a3e 100755 (executable)
@@ -14,13 +14,13 @@ class TestInfo(object):
         self.value_param = xmlnode.getAttribute("value_param")
         self.type_param = xmlnode.getAttribute("type_param")
 
+        custom_status = xmlnode.getAttribute("custom_status")
         failures = xmlnode.getElementsByTagName("failure")
-        if len(failures) > 0:
-            if any("No equivalent implementation" in f.getAttribute("message")
-                   for f in failures):
-                self.status = "notimpl"
-            else:
-                self.status = "failed"
+
+        if len(custom_status) > 0:
+            self.status = custom_status
+        elif len(failures) > 0:
+            self.status = "failed"
         else:
             self.status = xmlnode.getAttribute("status")