Skip to content

Commit c534587

Browse files
authored
Merge pull request swiftlang#70 from graydon/cperf-output-location
[run_cperf] Write comment.md to ${WORKSPACE} by default.
2 parents f64f395 + 25a4f9f commit c534587

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

run_cperf

+9-1
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,14 @@ def analyze_results(configs, args):
379379
return regressions
380380

381381

382+
def get_default_output(basename):
383+
if 'WORKSPACE' in os.environ:
384+
workspace = os.environ['WORKSPACE']
385+
return os.path.join(workspace, basename)
386+
else:
387+
return basename
388+
389+
382390
def parse_args():
383391
parser = argparse.ArgumentParser()
384392
parser.add_argument('swift_branch')
@@ -397,7 +405,7 @@ def parse_args():
397405
action='store_true')
398406
parser.add_argument('--output',
399407
type=argparse.FileType('wb', 0),
400-
default='comment.md')
408+
default=get_default_output('comment.md'))
401409
parser.add_argument('--clean',
402410
action='store_true')
403411
parser.add_argument('--setup-workspaces-for-pr',

0 commit comments

Comments
 (0)