Skip to content

Commit 4e19d5f

Browse files
authored
Merge pull request swiftlang#71 from graydon/cperf-copy-output
[run_cperf] Hack to work around misconfiguration
2 parents c534587 + 02c9663 commit 4e19d5f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Diff for: run_cperf

+17-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,23 @@ def main():
8282
if not args.skip_runner:
8383
execute_runner(instance, workspace, configs, args)
8484

85-
analyze_results(configs, args)
85+
regressions = analyze_results(configs, args)
86+
87+
# Temporary hack to write output to workspace when in CI,
88+
# regardless of --output passed.
89+
if 'WORKSPACE' in os.environ:
90+
workspace = os.environ['WORKSPACE']
91+
print("WORKSPACE: %s" % workspace)
92+
p = os.path.join(workspace, 'comment.md')
93+
o = os.path.abspath(os.path.join(os.getcwd(),
94+
args.output.name))
95+
print("Output written to: %s" % o)
96+
if o != p:
97+
print("Copying %s to %s" % (o, p))
98+
args.output.close()
99+
shutil.copyfile(o, p)
100+
101+
return regressions
86102

87103

88104
def get_sandbox_profile_flags():

0 commit comments

Comments
 (0)