diff options
Diffstat (limited to 'library/python/testing')
-rw-r--r-- | library/python/testing/recipe/__init__.py | 3 | ||||
-rw-r--r-- | library/python/testing/yatest_lib/ya.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/library/python/testing/recipe/__init__.py b/library/python/testing/recipe/__init__.py index 483fe6a739..be5c956fd5 100644 --- a/library/python/testing/recipe/__init__.py +++ b/library/python/testing/recipe/__init__.py @@ -49,6 +49,7 @@ def get_options(): parser.add_argument("--build-root", type=str, dest="build_root", default=None, help="Build root directory") parser.add_argument("--source-root", type=str, dest="source_root", default=None, help="Source root directory") parser.add_argument("--output-dir", type=str, dest="output_dir", default=None, help="Output directory") + parser.add_argument("--env-file", type=str, dest="env_file", default=None, help="File to read/write environment variables") args, opts = parser.parse_known_args() @@ -59,7 +60,7 @@ def get_options(): "test_stderr": args.test_stderr, } - ya = Ya(context=context, build_root=args.build_root, source_root=args.source_root, output_dir=args.output_dir) + ya = Ya(context=context, build_root=args.build_root, source_root=args.source_root, output_dir=args.output_dir, env_file=args.env_file) ya._data_root = "" # XXX remove diff --git a/library/python/testing/yatest_lib/ya.py b/library/python/testing/yatest_lib/ya.py index 607694e0c5..89a82b55a6 100644 --- a/library/python/testing/yatest_lib/ya.py +++ b/library/python/testing/yatest_lib/ya.py @@ -39,6 +39,7 @@ class Ya(object): valgrind_path=None, gdb_path=None, data_root=None, + env_file=None, ): context_file_path = os.environ.get("YA_TEST_CONTEXT_FILE", None) if context_file_path: @@ -101,7 +102,7 @@ class Ya(object): self._context["sanitize"] = context_build.get("sanitizer") self._context["ya_trace_path"] = context_internal.get("trace_file") - self._env_file = context_internal.get("env_file") + self._env_file = context_internal.get("env_file") or env_file if context: for k, v in context.items(): |