Skip to content

Commit e345b71

Browse files
authored
backport syntax enhancements (#608)
* backport syntax enhancements * add missing forwarding of the param * add missing forwarding of the param * add missing forwarding of the param * backport syntax enhancements
1 parent ec63276 commit e345b71

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

Diff for: jenkins/helper/arangosh.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def get_environment(self, params):
2525

2626
def run_testing(self,
2727
testcase,
28+
arangosh_args,
2829
testing_args,
2930
timeout,
3031
directory,
@@ -54,7 +55,7 @@ def run_testing(self,
5455
'--javascript.allow-external-process-control', 'true',
5556
'--javascript.execute', str(testscript),
5657
]
57-
run_cmd = args +[
58+
run_cmd = arangosh_args + args +[
5859
'--',
5960
testcase,
6061
'--testOutput', directory ] + testing_args

Diff for: jenkins/helper/async_client.py

+1
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ def run_monitored(self,
601601
timeout_str = "TIMEOUT OCCURED!"
602602
print(timeout_str)
603603
timeout_str += "\n"
604+
params['error'] += timeout_str
604605
elif rc_exit is None:
605606
print_log(f"{identifier} waiting for regular exit", params)
606607
rc_exit = process.wait()

Diff for: jenkins/helper/test_config.py

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def __init__(self,
1616
name,
1717
suite,
1818
args,
19+
arangosh_args,
1920
priority,
2021
parallelity,
2122
flags):
@@ -61,6 +62,11 @@ def __init__(self,
6162
self.report_file = self.base_logdir / 'UNITTEST_RESULT.json'
6263
self.base_testdir = cfg.test_data_dir_x / self.name
6364

65+
self.arangosh_args = [];
66+
# the yaml work around is to have an A prepended. detect and strip out:
67+
if arangosh_args is not None and len(arangosh_args) > 0 and arangosh_args != 'A ""':
68+
print(arangosh_args)
69+
self.arangosh_args = json.loads(arangosh_args[1:])
6470
self.args = copy.deepcopy(cfg.extra_args)
6571
for param in args:
6672
if param.startswith('$'):

Diff for: jenkins/helper/test_launch_controller.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,15 @@ def read_definition_line(line):
194194
flags = []
195195
params = {}
196196
args = []
197+
arangosh_args = []
197198

198199
for idx, bit in enumerate(remainder):
199200
if bit == "--":
200201
args = remainder[idx + 1:]
201202
break
202-
203-
if "=" in bit:
203+
if bit.startswith("--"):
204+
arangosh_args.append(bit)
205+
elif "=" in bit:
204206
key, value = bit.split("=", maxsplit=1)
205207
params[key] = value
206208
else:
@@ -226,6 +228,7 @@ def read_definition_line(line):
226228
"parallelity": params["parallelity"],
227229
"flags": flags,
228230
"args": args,
231+
"arangosh_args": arangosh_args,
229232
"params": params
230233
}
231234

Diff for: jenkins/helper/testing_runner.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def testing_runner(testing_instance, this, arangosh):
8888
this.cov_prefix.mkdir(parents=True)
8989
this.cov_prefix_var = this.cov_prefix / "testingjs"
9090
ret = arangosh.run_testing(this.suite,
91+
this.arangosh_args,
9192
this.args,
9293
999999999,
9394
this.base_logdir,
@@ -107,7 +108,7 @@ def testing_runner(testing_instance, this, arangosh):
107108
this.delta_seconds = this.delta.total_seconds()
108109
this.crashed = not this.crashed_file.exists() or this.crashed_file.read_text() == "true"
109110
this.success = this.success and this.success_file.exists() and this.success_file.read_text() == "true"
110-
print(f'done with {this.name_enum} -> {this.success}')
111+
print(f"done with {this.name_enum} -> {this.success} {ret['rc_exit']}")
111112
if this.report_file.exists():
112113
this.structured_results = this.report_file.read_text(encoding="UTF-8", errors='ignore')
113114
this.summary = ret['error']
@@ -636,6 +637,7 @@ def register_test_func(self, test):
636637
[ *args,
637638
'--index', f"{i}",
638639
'--testBuckets', f'{num_buckets}/{i}'],
640+
test['arangosh_args'],
639641
test['priority'],
640642
parallelity,
641643
test['flags']))
@@ -645,6 +647,7 @@ def register_test_func(self, test):
645647
name,
646648
test["suite"],
647649
[ *args],
650+
test['arangosh_args'],
648651
test['priority'],
649652
parallelity,
650653
test['flags']))

0 commit comments

Comments
 (0)