[Stress] Small improvement of scripts (#1302)

* [Stress] Extend CLI with arguments checks for compare_memcheck_2_runs.py

* [Stress] Extend requirements.txt with PyYAML
This commit is contained in:
Vitaliy Urusovskij
2020-07-22 10:24:15 +03:00
committed by GitHub
parent a773dfbbcc
commit 5665ec9b26
2 changed files with 11 additions and 1 deletions

View File

@@ -186,6 +186,15 @@ def cli_parser():
'Example: /home/.../file.csv')
args = parser.parse_args()
missed_args = []
if not (os.path.isdir(args.cur_source) and os.path.isdir(args.ref_source)) and not args.db_url:
missed_args.append("--db_url")
if not os.path.isdir(args.cur_source) and not args.db_collection:
missed_args.append("--db_collection")
if not os.path.isdir(args.ref_source) and not args.ref_db_collection:
missed_args.append("--ref_db_collection")
if missed_args:
raise argparse.ArgumentError("Arguments {} are required".format(",".join(missed_args)))
return args

View File

@@ -1,2 +1,3 @@
pymongo
Jinja2
Jinja2
PyYAML