From c31c1d8b049e1cc09fdcb2850d564971c51b0a44 Mon Sep 17 00:00:00 2001 From: Will <5217539+WRansohoff@users.noreply.github.com> Date: Fri, 13 Aug 2021 11:08:09 -0400 Subject: [PATCH] Accept absolute project paths as inputs to the 'run_fpga_task.py' script. --- openfpga_flow/scripts/run_fpga_task.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openfpga_flow/scripts/run_fpga_task.py b/openfpga_flow/scripts/run_fpga_task.py index 7665cfb1b..c1ced3ccb 100644 --- a/openfpga_flow/scripts/run_fpga_task.py +++ b/openfpga_flow/scripts/run_fpga_task.py @@ -168,13 +168,19 @@ def generate_each_task_actions(taskname): # Check if task directory exists and consistent local_tasks = os.path.join(*(taskname)) repo_tasks = os.path.join(gc["task_dir"], *(taskname)) + abs_tasks = os.path.abspath('/' + local_tasks) if os.path.isdir(local_tasks): os.chdir(local_tasks) curr_task_dir = os.path.abspath(os.getcwd()) + elif os.path.isdir(abs_tasks): + curr_task_dir = abs_tasks elif os.path.isdir(repo_tasks): curr_task_dir = repo_tasks else: - clean_up_and_exit("Task directory [%s] not found" % taskname + " locally at [%s]" % local_tasks + " or in OpenFPGA task directory [%s]" % repo_tasks) + clean_up_and_exit("Task directory [%s] not found" % taskname + + " locally at [%s]" % local_tasks + + ", absolutely at [%s]" % abs_tasks + + ", or in OpenFPGA task directory [%s]" % repo_tasks) os.chdir(curr_task_dir)