diff options
author | svidyuk <svidyuk@yandex-team.ru> | 2022-04-19 08:56:00 +0300 |
---|---|---|
committer | svidyuk <svidyuk@yandex-team.ru> | 2022-04-19 08:56:00 +0300 |
commit | e31039e77790d9a0a98df062c9bdf66339670a01 (patch) | |
tree | 3064b90bf79791e23558b47aabd9d77754d2144c /build/scripts | |
parent | c43178bce38cb3e83f6e72269f96bdf821b29f9a (diff) | |
download | ydb-e31039e77790d9a0a98df062c9bdf66339670a01.tar.gz |
Configure time check for junit runners conflict
DEVTOOLSSUPPORT-12150
DEVTOOLSSUPPORT-7454
ref:198a3a6d43c19edcbeaba53ae4e2434ac4178f5b
Diffstat (limited to 'build/scripts')
-rw-r--r-- | build/scripts/run_junit.py | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/build/scripts/run_junit.py b/build/scripts/run_junit.py index 5f56403bed..1e84934f4d 100644 --- a/build/scripts/run_junit.py +++ b/build/scripts/run_junit.py @@ -6,11 +6,6 @@ import sys SHUTDOWN_SIGNAL = 'SIGUSR1' -PROVIDES = { - "devtools/junit-runner/devtools-junit-runner.jar": "junit-runner", - "devtools/junit5-runner/devtools-junit5-runner.jar": "junit-runner", -} - class SignalInterruptionError(Exception): pass @@ -20,61 +15,9 @@ def on_shutdown(s, f): raise SignalInterruptionError() -def get_tracefile_path(args): - return args[args.index('--output') + 1] - - -def dump_chunk_error(tracefile, name, imps): - with open(tracefile, 'a') as afile: - msg = { - "timestamp": time.time(), - "name": "chunk-event", - "value": { - "errors": [ - [ - "fail", - "[[bad]]Test contains conflicting dependencies for [[imp]]{}[[bad]]: {}[[rst]]".format( - name, ', '.join(imps) - ), - ], - ], - }, - } - json.dump(msg, afile) - afile.write("\n") - - -def verify_classpath(args): - cpfile = args[args.index('-classpath') + 1] - assert cpfile.startswith('@'), cpfile - - cpfile = cpfile[1:] - assert os.path.exists(cpfile) - - with open(cpfile) as afile: - data = afile.read().splitlines() - - collisions = collections.defaultdict(set) - for cp in data: - if cp in PROVIDES: - collisions[PROVIDES[cp]].add(cp) - - for name, imps in collisions.items(): - if len(imps) > 1: - tracefile = get_tracefile_path(args) - dump_chunk_error(tracefile, name, imps) - return False - return True - - def main(): args = sys.argv[1:] - # Emulates PROVIDES(X) for junit-runner and junit5-runner. - # For more info see DEVTOOLSSUPPORT-7454 - if not verify_classpath(args): - return 1 - def execve(): os.execve(args[0], args, os.environ) |