Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimofey <t.danshin@corp.mail.ru>2015-05-27 17:11:31 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:48:54 +0300
commitfa8bccaa84d6a183f732b6656de44c05172b574e (patch)
treedc8209f3378e3f358ab8fe4cb738375d9ca631b9 /testing
parent0ecaac89a31e40b6b57362bc84e5bee87b526a35 (diff)
This is a small fix for the situtaion when failed tests are ignored by Jenkins.
This was due to the fact that the sentinel for a test log section for a particular test was the duration of that test, and failed tests did not log the duration. The scripts will be moved to the tools folder and brought into accordance with idiomatic python in the next pool request. Made the test runner always exit with 0. Changed nanos to milis
Diffstat (limited to 'testing')
-rw-r--r--testing/testingmain.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/testing/testingmain.cpp b/testing/testingmain.cpp
index 8c2943cd27..931a1ce49a 100644
--- a/testing/testingmain.cpp
+++ b/testing/testingmain.cpp
@@ -93,12 +93,12 @@ int main(int argc, char * argv[])
return 5;
}
+ my::HighResTimer timer(true);
+
try
{
- my::HighResTimer timer(true);
// Run the test.
pTest->m_Fn();
- uint64_t const elapsed = timer.ElapsedNano();
if (g_bLastTestOK)
{
@@ -111,7 +111,6 @@ int main(int argc, char * argv[])
testResults[iTest] = false;
++numFailedTests;
}
- LOG(LINFO, ("Test took", elapsed, "ns"));
}
catch (TestFailureException const & )
@@ -132,6 +131,9 @@ int main(int argc, char * argv[])
++numFailedTests;
}
g_bLastTestOK = true;
+
+ uint64_t const elapsed = timer.ElapsedNano();
+ LOG(LINFO, ("Test took", elapsed / 1000000, "ms"));
}
if (numFailedTests == 0)