[Flow] Support multi-user enviroment for running task

This commit is contained in:
Ganesh Gore 2021-02-07 22:11:04 -07:00
parent 9f7d03cd05
commit ede5f8ed58
2 changed files with 15 additions and 2 deletions

View File

@ -10,3 +10,10 @@ echo -e "FPGA-SDC regression tests";
echo -e "Testing SDC generation with time units"; echo -e "Testing SDC generation with time units";
run-task fpga_sdc/sdc_time_unit --debug --show_thread_logs run-task fpga_sdc/sdc_time_unit --debug --show_thread_logs
# Repgression test to test multi-user enviroment
# TODO : While restructuring regression test files
# move this to separate file
cp -r */*/fpga_sdc/sdc_time_unit /tmp/
cd /tmp/ && run-task sdc_time_unit

View File

@ -166,8 +166,14 @@ def generate_each_task_actions(taskname):
""" """
# Check if task directory exists and consistent # Check if task directory exists and consistent
curr_task_dir = os.path.join(gc["task_dir"], *(taskname)) local_tasks = os.path.join(*(taskname))
if not os.path.isdir(curr_task_dir): repo_tasks = os.path.join(gc["task_dir"], *(taskname))
if os.path.isdir(local_tasks):
os.chdir(local_tasks)
curr_task_dir = os.path.abspath(os.getcwd())
elif os.path.isdir(repo_tasks):
curr_task_dir = repo_tasks
else:
clean_up_and_exit("Task directory [%s] not found" % curr_task_dir) clean_up_and_exit("Task directory [%s] not found" % curr_task_dir)
os.chdir(curr_task_dir) os.chdir(curr_task_dir)