@@ -115,13 +115,15 @@ const optionsDocumentation = [
115
115
'' ,
116
116
' - `build`: the directory containing the binaries' ,
117
117
' - `buildType`: Windows build type (Debug, Release), leave empty on linux' ,
118
+ ' - `configDir`: the directory containing the config files, defaults to' ,
119
+ ' etc/testing' ,
118
120
' - `rspec`: the location of rspec program' ,
119
121
' - `ruby`: the location of ruby program; if empty start rspec directly',
120
122
'' ,
121
123
' - `rr`: if set to true arangod instances are run with rr' ,
122
124
'' ,
123
125
' - `sanitizer`: if set the programs are run with enabled sanitizer' ,
124
- ' and need longer tomeouts ' ,
126
+ ' and need longer timeouts ' ,
125
127
'' ,
126
128
' - `valgrind`: if set the programs are run with the valgrind' ,
127
129
' memory checker; should point to the valgrind executable' ,
@@ -148,6 +150,7 @@ const optionsDefaults = {
148
150
'cleanup' : true ,
149
151
'cluster' : false ,
150
152
'concurrency' : 3 ,
153
+ 'configDir' : 'etc/testing' ,
151
154
'coordinators' : 1 ,
152
155
'coreDirectory' : '/var/tmp' ,
153
156
'dbServers' : 2 ,
@@ -235,19 +238,20 @@ const TOP_DIR = (function findTopDir () {
235
238
} ( ) ) ;
236
239
237
240
let BIN_DIR ;
238
- let CONFIG_DIR ;
239
241
let ARANGOBENCH_BIN ;
240
242
let ARANGODUMP_BIN ;
241
243
let ARANGOD_BIN ;
242
244
let ARANGOIMP_BIN ;
243
245
let ARANGORESTORE_BIN ;
244
246
let ARANGOSH_BIN ;
247
+ let CONFIG_ARANGODB_DIR ;
245
248
let CONFIG_RELATIVE_DIR ;
249
+ let CONFIG_DIR ;
246
250
let JS_DIR ;
247
251
let JS_ENTERPRISE_DIR ;
248
252
let LOGS_DIR ;
249
253
let UNITTESTS_DIR ;
250
- let GDB_OUTPUT = "" ;
254
+ let GDB_OUTPUT = "" ;
251
255
252
256
function makeResults ( testname , instanceInfo ) {
253
257
const startTime = time ( ) ;
@@ -311,7 +315,7 @@ function makeArgsArangod (options, appDir, role) {
311
315
}
312
316
313
317
return {
314
- 'configuration' : 'etc/testing/' + config ,
318
+ 'configuration' : fs . join ( CONFIG_DIR , config ) ,
315
319
'define' : 'TOP_DIR=' + TOP_DIR ,
316
320
'wal.flush-timeout' : options . walFlushTimeout ,
317
321
'javascript.app-path' : appDir ,
@@ -325,7 +329,7 @@ function makeArgsArangod (options, appDir, role) {
325
329
326
330
function makeArgsArangosh ( options ) {
327
331
return {
328
- 'configuration' : 'etc/testing/ arangosh.conf',
332
+ 'configuration' : fs . join ( CONFIG_DIR , ' arangosh.conf') ,
329
333
'javascript.startup-directory' : JS_DIR ,
330
334
'javascript.module-directory' : JS_ENTERPRISE_DIR ,
331
335
'server.username' : options . username ,
@@ -1161,7 +1165,7 @@ function runArangoImp (options, instanceInfo, what) {
1161
1165
1162
1166
function runArangoDumpRestore ( options , instanceInfo , which , database ) {
1163
1167
let args = {
1164
- 'configuration' : ( which === 'dump' ? 'etc/testing/ arangodump.conf' : 'etc/testing/ arangorestore.conf' ) ,
1168
+ 'configuration' : fs . join ( CONFIG_DIR , ( which === 'dump' ? 'arangodump.conf' : 'arangorestore.conf' ) ) ,
1165
1169
'server.username' : options . username ,
1166
1170
'server.password' : options . password ,
1167
1171
'server.endpoint' : instanceInfo . endpoint ,
@@ -1189,7 +1193,7 @@ function runArangoDumpRestore (options, instanceInfo, which, database) {
1189
1193
1190
1194
function runArangoBenchmark ( options , instanceInfo , cmds ) {
1191
1195
let args = {
1192
- 'configuration' : 'etc/testing/ arangobench.conf',
1196
+ 'configuration' : fs . join ( CONFIG_DIR , ' arangobench.conf') ,
1193
1197
'server.username' : options . username ,
1194
1198
'server.password' : options . password ,
1195
1199
'server.endpoint' : instanceInfo . endpoint ,
@@ -2698,7 +2702,7 @@ testFuncs.config = function (options) {
2698
2702
print ( CYAN + "checking '" + test + "'" + RESET ) ;
2699
2703
2700
2704
const args = {
2701
- 'configuration' : fs . join ( CONFIG_DIR , test + '.conf' ) ,
2705
+ 'configuration' : fs . join ( CONFIG_ARANGODB_DIR , test + '.conf' ) ,
2702
2706
'flatCommands' : [ '--check-configuration' ]
2703
2707
} ;
2704
2708
@@ -2766,7 +2770,7 @@ testFuncs.config = function (options) {
2766
2770
2767
2771
testFuncs . dfdb = function ( options ) {
2768
2772
const dataDir = fs . getTempFile ( ) ;
2769
- const args = [ '-c' , 'etc/testing/ arango-dfdb.conf', dataDir ] ;
2773
+ const args = [ '-c' , fs . join ( CONFIG_DIR , ' arango-dfdb.conf') , dataDir ] ;
2770
2774
2771
2775
fs . makeDirectoryRecursive ( dataDir ) ;
2772
2776
let results = { } ;
@@ -2971,12 +2975,12 @@ testFuncs.foxx_manager = function (options) {
2971
2975
let results = { } ;
2972
2976
2973
2977
results . update = runArangoshCmd ( options , instanceInfo , {
2974
- 'configuration' : 'etc/testing/ foxx-manager.conf'
2978
+ 'configuration' : fs . join ( CONFIG_DIR , ' foxx-manager.conf')
2975
2979
} , [ 'update' ] ) ;
2976
2980
2977
2981
if ( results . update . status === true || options . force ) {
2978
2982
results . search = runArangoshCmd ( options , instanceInfo , {
2979
- 'configuration' : 'etc/testing/ foxx-manager.conf'
2983
+ 'configuration' : fs . join ( CONFIG_DIR , ' foxx-manager.conf')
2980
2984
} , [ 'search' , 'itzpapalotl' ] ) ;
2981
2985
}
2982
2986
@@ -4231,16 +4235,20 @@ function unitTest (cases, options) {
4231
4235
UNITTESTS_DIR = fs . join ( UNITTESTS_DIR , options . buildType ) ;
4232
4236
}
4233
4237
4234
- CONFIG_DIR = fs . join ( TOP_DIR , builddir , 'etc' , 'arangodb3' ) ;
4235
4238
ARANGOBENCH_BIN = fs . join ( BIN_DIR , 'arangobench' ) ;
4236
4239
ARANGODUMP_BIN = fs . join ( BIN_DIR , 'arangodump' ) ;
4237
4240
ARANGOD_BIN = fs . join ( BIN_DIR , 'arangod' ) ;
4238
4241
ARANGOIMP_BIN = fs . join ( BIN_DIR , 'arangoimp' ) ;
4239
4242
ARANGORESTORE_BIN = fs . join ( BIN_DIR , 'arangorestore' ) ;
4240
4243
ARANGOSH_BIN = fs . join ( BIN_DIR , 'arangosh' ) ;
4244
+
4245
+ CONFIG_ARANGODB_DIR = fs . join ( TOP_DIR , builddir , 'etc' , 'arangodb3' ) ;
4241
4246
CONFIG_RELATIVE_DIR = fs . join ( TOP_DIR , 'etc' , 'relative' ) ;
4247
+ CONFIG_DIR = fs . join ( TOP_DIR , options . configDir ) ;
4248
+
4242
4249
JS_DIR = fs . join ( TOP_DIR , 'js' ) ;
4243
4250
JS_ENTERPRISE_DIR = fs . join ( TOP_DIR , 'enterprise/js' ) ;
4251
+
4244
4252
LOGS_DIR = fs . join ( TOP_DIR , 'logs' ) ;
4245
4253
4246
4254
let checkFiles = [
0 commit comments