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
11 changes: 8 additions & 3 deletions easybuild/framework/easyconfig/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def get_paths_for(subdir=EASYCONFIGS_PKG_SUBDIR, robot_path=None):
return paths


def alt_easyconfig_paths(tmpdir, tweaked_ecs=False, from_prs=None):
def alt_easyconfig_paths(tmpdir, tweaked_ecs=False, from_prs=None, review_pr=None):
"""Obtain alternative paths for easyconfig files."""

# paths where tweaked easyconfigs will be placed, easyconfigs listed on the command line take priority and will be
Expand All @@ -321,9 +321,14 @@ def alt_easyconfig_paths(tmpdir, tweaked_ecs=False, from_prs=None):

# paths where files touched in PRs will be downloaded to,
# which are picked up via 'pr_paths' build option in fetch_files_from_pr
pr_paths = None
pr_paths = []
if from_prs:
pr_paths = [os.path.join(tmpdir, 'files_pr%s' % pr) for pr in from_prs]
pr_paths = from_prs[:]
if review_pr and review_pr not in pr_paths:
pr_paths.append(review_pr)

if pr_paths:
pr_paths = [os.path.join(tmpdir, 'files_pr%s' % pr) for pr in pr_paths]

return tweaked_ecs_paths, pr_paths

Expand Down
8 changes: 7 additions & 1 deletion easybuild/tools/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,10 +1547,16 @@ def set_up_configuration(args=None, logfile=None, testing=False, silent=False):
except ValueError:
raise EasyBuildError("Argument to --from-pr must be a comma separated list of PR #s.")

try:
review_pr = (lambda x: int(x) if x else None)(eb_go.options.review_pr)
except ValueError:
raise EasyBuildError("Argument to --review-pr must be an integer PR #.")

# determine robot path
# --try-X, --dep-graph, --search use robot path for searching, so enable it with path of installed easyconfigs
tweaked_ecs = try_to_generate and build_specs
tweaked_ecs_paths, pr_paths = alt_easyconfig_paths(tmpdir, tweaked_ecs=tweaked_ecs, from_prs=from_prs)
tweaked_ecs_paths, pr_paths = alt_easyconfig_paths(tmpdir, tweaked_ecs=tweaked_ecs, from_prs=from_prs,
review_pr=review_pr)
auto_robot = try_to_generate or options.check_conflicts or options.dep_graph or search_query
robot_path = det_robot_path(options.robot_paths, tweaked_ecs_paths, pr_paths, auto_robot=auto_robot)
log.debug("Full robot path: %s", robot_path)
Expand Down