aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-06-21 16:21:33 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-06-22 08:34:26 +0000
commitda6c0e50588f08e4650f3a335310509e6be5fecd (patch)
tree2c5512385d2dc0a7671447a666afa0d90a8c32b2
parent29420ab4698ad45de994cf367b94f23ddc874200 (diff)
Benchmarker: Keep the temp data in case of a failure
So the problem can be more easily investigated. Change-Id: Ia968a4e42164cce5b3f67d9e8a29ccd5b24e3eaf Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--tests/benchmarker/benchmarker-main.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/benchmarker/benchmarker-main.cpp b/tests/benchmarker/benchmarker-main.cpp
index e9d483f96..51eb85dcf 100644
--- a/tests/benchmarker/benchmarker-main.cpp
+++ b/tests/benchmarker/benchmarker-main.cpp
@@ -104,12 +104,12 @@ static void printResults(Activities activities, const BenchmarkResults &results,
int main(int argc, char *argv[])
{
+ QCoreApplication app(argc, argv);
+ CommandLineParser clParser;
+ clParser.parse();
+ Benchmarker benchmarker(clParser.activies(), clParser.oldCommit(), clParser.newCommit(),
+ clParser.testProjectFilePath(), clParser.qbsRepoDirPath());
try {
- QCoreApplication app(argc, argv);
- CommandLineParser clParser;
- clParser.parse();
- Benchmarker benchmarker(clParser.activies(), clParser.oldCommit(), clParser.newCommit(),
- clParser.testProjectFilePath(), clParser.qbsRepoDirPath());
benchmarker.benchmark();
printResults(clParser.activies(), benchmarker.results(), clParser.regressionThreshold());
if (hasRegression) {
@@ -118,7 +118,10 @@ int main(int argc, char *argv[])
"under " << qPrintable(benchmarker.rawDataBaseDir()) << '.' << std::endl;
}
} catch (const Exception &e) {
+ benchmarker.keepRawData();
std::cerr << qPrintable(e.description()) << std::endl;
+ std::cerr << "Build data available under " << qPrintable(benchmarker.rawDataBaseDir())
+ << '.' << std::endl;
return EXIT_FAILURE;
}
}