mirror of https://gitee.com/bigwinds/arangodb
Make testing.js find enterprise tests in enterprise version.
This commit is contained in:
parent
0130c0d978
commit
1c7ed5d86f
|
@ -1733,99 +1733,55 @@ let testsCases = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function findTests () {
|
function findTests () {
|
||||||
|
function doOnePathInner(path) {
|
||||||
|
return _.filter(fs.list(makePathUnix(path)),
|
||||||
|
function (p) {
|
||||||
|
return p.substr(-3) === '.js';
|
||||||
|
})
|
||||||
|
.map(function (x) {
|
||||||
|
return fs.join(makePathUnix(path), x);
|
||||||
|
}).sort();
|
||||||
|
}
|
||||||
|
|
||||||
|
function doOnePath(path) {
|
||||||
|
var community = doOnePathInner(path);
|
||||||
|
if (global.ARANGODB_CLIENT_VERSION(true)['enterprise-version']) {
|
||||||
|
return community.concat(doOnePathInner('enterprise/Enterprise/' + path));
|
||||||
|
} else {
|
||||||
|
return community;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (testsCases.setup) {
|
if (testsCases.setup) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
testsCases.common = _.filter(fs.list(makePathUnix('js/common/tests/shell')),
|
testsCases.common = doOnePath('js/common/tests/shell');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/common/tests/shell'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.server_only = _.filter(fs.list(makePathUnix('js/server/tests/shell')),
|
testsCases.server_only = doOnePath('js/server/tests/shell');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/server/tests/shell'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.client_only = _.filter(fs.list(makePathUnix('js/client/tests/shell')),
|
testsCases.client_only = doOnePath('js/client/tests/shell');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/client/tests/shell'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.server_aql = _.filter(fs.list(makePathUnix('js/server/tests/aql')),
|
testsCases.server_aql = doOnePath('js/server/tests/aql');
|
||||||
function (p) {
|
testsCases.server_aql = _.filter(testsCases.server_aql,
|
||||||
return p.substr(-3) === '.js' && p.indexOf('ranges-combined') === -1;
|
function(p) { return p.indexOf('ranges-combined') === -1; });
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/server/tests/aql'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.server_aql_extended =
|
testsCases.server_aql_extended = doOnePath('js/server/tests/aql');
|
||||||
_.filter(fs.list(makePathUnix('js/server/tests/aql')),
|
testsCases.server_aql_extended = _.filter(testsCases.server_aql_extended,
|
||||||
function (p) {
|
function(p) { return p.indexOf('ranges-combined') !== -1; });
|
||||||
return p.substr(-3) === '.js' && p.indexOf('ranges-combined') !== -1;
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/server/tests/aql'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.server_aql_performance =
|
testsCases.server_aql_performance = doOnePath('js/server/perftests');
|
||||||
_.filter(fs.list(makePathUnix('js/server/perftests')),
|
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/server/perftests'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.server_http = _.filter(fs.list(makePathUnix('js/common/tests/http')),
|
testsCases.server_http = doOnePath('js/common/tests/http');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/common/tests/http'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.replication = _.filter(fs.list(makePathUnix('js/common/tests/replication')),
|
testsCases.replication = doOnePath('js/common/tests/replication');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/common/tests/replication'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.agency = _.filter(fs.list(makePathUnix('js/client/tests/agency')),
|
testsCases.agency = doOnePath('js/client/tests/agency');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/client/tests/agency'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.resilience = _.filter(fs.list(makePathUnix('js/server/tests/resilience')),
|
testsCases.resilience = doOnePath('js/server/tests/resilience');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/server/tests/resilience'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.client_resilience = _.filter(fs.list(makePathUnix('js/client/tests/resilience')),
|
testsCases.client_resilience = doOnePath('js/client/tests/resilience');
|
||||||
function (p) {
|
|
||||||
return p.substr(-3) === '.js';
|
|
||||||
}).map(
|
|
||||||
function (x) {
|
|
||||||
return fs.join(makePathUnix('js/client/tests/resilience'), x);
|
|
||||||
}).sort();
|
|
||||||
|
|
||||||
testsCases.server = testsCases.common.concat(testsCases.server_only);
|
testsCases.server = testsCases.common.concat(testsCases.server_only);
|
||||||
testsCases.client = testsCases.common.concat(testsCases.client_only);
|
testsCases.client = testsCases.common.concat(testsCases.client_only);
|
||||||
|
|
Loading…
Reference in New Issue