Chromium Code Reviews| Index: run_isolated.py |
| diff --git a/run_isolated.py b/run_isolated.py |
| index 0c1b4cc0c7552350a98b9caca9000d071198b25e..9e0ad754e7a0715a6ab9cd3e6bb8932ecce65107 100755 |
| --- a/run_isolated.py |
| +++ b/run_isolated.py |
| @@ -39,7 +39,9 @@ THIS_FILE_PATH = os.path.abspath(__file__) if __file__ else None |
| BASE_DIR = os.path.dirname(THIS_FILE_PATH) if __file__ else None |
| # Directory that contains currently running script file. |
| -MAIN_DIR = os.path.dirname(os.path.abspath(zip_package.get_main_script_path())) |
| +MAIN_DIR = ( |
|
Vadim Sh.
2013/10/01 18:59:51
nit: I'd change it into regular 'if' and added com
M-A Ruel
2013/10/01 19:06:35
Done.
|
| + os.path.dirname(os.path.abspath(zip_package.get_main_script_path())) |
| + if zip_package.get_main_script_path() else None) |
| # Types of action accepted by link_file(). |
| HARDLINK, HARDLINK_WITH_FALLBACK, SYMLINK, COPY = range(1, 5) |
| @@ -514,8 +516,9 @@ def run_tha_test(isolated_hash, cache_dir, retriever, policies): |
| # TODO(vadimsh): Pass it via 'env_vars' in manifest. |
| # Add a rotating log file if one doesn't already exist. |
| env = os.environ.copy() |
| - env.setdefault('RUN_TEST_CASES_LOG_FILE', |
| - os.path.join(MAIN_DIR, RUN_TEST_CASES_LOG)) |
| + if MAIN_DIR: |
| + env.setdefault('RUN_TEST_CASES_LOG_FILE', |
| + os.path.join(MAIN_DIR, RUN_TEST_CASES_LOG)) |
| try: |
| with tools.Profiler('RunTest'): |
| return subprocess.call(settings.command, cwd=cwd, env=env) |