Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1454,11 +1454,11 @@ def set_up_configuration(args=None, logfile=None, testing=False, silent=False):
init_build_options(build_options=build_options, cmdline_options=options)

# done here instead of in _postprocess_include because github integration requires build_options to be initialized
try:
easyblock_prs = map(int, eb_go.options.include_easyblocks_from_pr)
except ValueError:
raise EasyBuildError("Argument to --include-easyblocks-from-pr must be a comma separated list of PR numbers.")
if easyblock_prs:
if eb_go.options.include_easyblocks_from_pr:
try:
easyblock_prs = map(int, eb_go.options.include_easyblocks_from_pr)
except ValueError:
raise EasyBuildError("Argument to --include-easyblocks-from-pr must be a comma separated list of PR #s.")

if eb_go.options.include_easyblocks:
# check if you are including the same easyblock twice
Expand Down
18 changes: 11 additions & 7 deletions easybuild/tools/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,13 @@ def post_pr_test_report(pr_nr, repo_type, test_report, msg, init_session_state,

comment_lines = ["Test report by @%s" % github_user]

easyblocks_pr_nr = build_option('include_easyblocks_from_pr')
if easyblocks_pr_nr:
if build_option('include_easyblocks_from_pr'):
if repo_type == GITHUB_EASYCONFIGS_REPO:
comment_lines.append("Using easyblocks from https://github.com/%s/%s/pull/%s" % (
pr_target_account, GITHUB_EASYBLOCKS_REPO, easyblocks_pr_nr))
easyblocks_pr_nrs = map(int, build_option('include_easyblocks_from_pr'))
comment_lines.append("Using easyblocks from PR(s) %s" %
", ".join(["https://github.com/%s/%s/pull/%s" %
(pr_target_account, GITHUB_EASYBLOCKS_REPO, easyblocks_pr_nr)
for easyblocks_pr_nr in easyblocks_pr_nrs]))
elif repo_type == GITHUB_EASYBLOCKS_REPO:
comment_lines.append(test_report['overview'])
else:
Expand Down Expand Up @@ -316,7 +318,7 @@ def overall_test_report(ecs_with_res, orig_cnt, success, msg, init_session_state
"""
dump_path = build_option('dump_test_report')
pr_nr = build_option('from_pr')
eb_pr_nr = build_option('include_easyblocks_from_pr')
eb_pr_nrs = build_option('include_easyblocks_from_pr')
upload = build_option('upload_test_report')

if upload:
Expand All @@ -325,9 +327,11 @@ def overall_test_report(ecs_with_res, orig_cnt, success, msg, init_session_state
if pr_nr:
# upload test report to gist and issue a comment in the PR to notify
txt = post_pr_test_report(pr_nr, GITHUB_EASYCONFIGS_REPO, test_report, msg, init_session_state, success)
elif eb_pr_nr:
elif eb_pr_nrs:
# upload test report to gist and issue a comment in the easyblocks PR to notify
txt = post_pr_test_report(eb_pr_nr, GITHUB_EASYBLOCKS_REPO, test_report, msg, init_session_state, success)
for eb_pr_nr in map(int, eb_pr_nrs):
txt = post_pr_test_report(eb_pr_nr, GITHUB_EASYBLOCKS_REPO, test_report, msg, init_session_state,
success)
else:
# only upload test report as a gist
gist_url = upload_test_report_as_gist(test_report['full'])
Expand Down