Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: client/run_isolated.py

Issue 2928153002: Return named output files if they're symlinks (Closed)
Patch Set: Fixed import order Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/tests/run_isolated_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/run_isolated.py
diff --git a/client/run_isolated.py b/client/run_isolated.py
index 67cb9b2af42ca8858428e16b7e0c95377fa96005..8bbb6d233380d96d1fe035ca500b7e65c96fa877 100755
--- a/client/run_isolated.py
+++ b/client/run_isolated.py
@@ -367,10 +367,13 @@ def link_outputs_to_outdir(run_dir, out_dir, outputs):
isolateserver.create_directories(out_dir, outputs)
for o in outputs:
try:
- file_path.link_file(
- os.path.join(out_dir, o),
- os.path.join(run_dir, o),
- file_path.HARDLINK_WITH_FALLBACK)
+ infile = os.path.join(run_dir, o)
+ outfile = os.path.join(out_dir, o)
+ if fs.islink(infile):
+ # TODO(aludwin): handle directories
+ fs.copy2(infile, outfile)
+ else:
+ file_path.link_file(outfile, infile, file_path.HARDLINK_WITH_FALLBACK)
except OSError as e:
logging.info("Couldn't collect output file %s: %s", o, e)
« no previous file with comments | « no previous file | client/tests/run_isolated_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698