1
0
Fork 0

Properly detect the boost test, and fail if we can't find it.

This commit is contained in:
Wilfried Goesgens 2016-05-03 13:51:21 +02:00
parent ce27bfdaec
commit a455394a21
1 changed files with 26 additions and 4 deletions

View File

@ -2354,25 +2354,47 @@ testFuncs.authentication_parameters = function(options) {
/// @brief TEST: boost /// @brief TEST: boost
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
function locateBoostTest(name) {
var file = fs.join(UNITTESTS_DIR,name);
if (platform.substr(0, 3) === 'win') {
file += ".exe";
}
if (!fs.exists(file)) {
return "";
}
return file;
}
testFuncs.boost = function(options) { testFuncs.boost = function(options) {
const args = ["--show_progress"]; const args = ["--show_progress"];
let results = {}; let results = {};
if (!options.skipBoost) { if (!options.skipBoost) {
const run = fs.join(UNITTESTS_DIR, "basics_suite"); const run = locateBoostTest("basics_suite");
if (fs.exists(run)) { if (run !== "") {
results.basics = executeAndWait(run, args, options, "basics"); results.basics = executeAndWait(run, args, options, "basics");
} }
else {
results.basics = {
status: false,
message: "binary 'basics_suite' not found"};
}
} }
if (!options.skipGeo) { if (!options.skipGeo) {
const run = fs.join(UNITTESTS_DIR, "geo_suite"); const run = locateBoostTest("geo_suite");
if (fs.exists(run)) { if (run !== "") {
results.geo_suite = executeAndWait(run, args, options, "geo_suite"); results.geo_suite = executeAndWait(run, args, options, "geo_suite");
} }
else {
results.geo_suite = {
status: false,
message: "binary 'geo_suite' not found"};
}
} }
return results; return results;