diff --git a/flow/test/test_make_issue.sh b/flow/test/test_make_issue.sh index bc055ddbf6..4f6dd524c0 100755 --- a/flow/test/test_make_issue.sh +++ b/flow/test/test_make_issue.sh @@ -2,10 +2,13 @@ # make issue smoketest set -ue -o pipefail -testname=Element +# Pick a design that builds quickly and has +# has some interesting "make issue" features to test, +# such as ADDITIONAL_FILES -make DESIGN_CONFIG=designs/asap7/mock-array/$testname/config.mk floorplan -make ISSUE_TAG=tag DESIGN_CONFIG=designs/asap7/mock-array/$testname/config.mk io_placement_random_issue +make DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk floorplan +make ISSUE_TAG=tag DESIGN_CONFIG=designs/asap7/mock-array/Element/config.mk io_placement_random_issue +# io placement needs ADDITIONAL_FILES to work, so not a random test test_archive=io_placement_random_tag.tar.gz ls -l $test_archive echo "Testing $test_archive" @@ -14,6 +17,8 @@ rm -rf results/make-issue/ mkdir -p results/make-issue/ cd results/make-issue/ tar --strip-components=1 -xzf ../../$test_archive -runme=run-me-mock-array_$testname-asap7-base.sh +runme=run-me-mock-array_Element-asap7-base.sh sed -i 's/openroad -no_init/openroad -exit -no_init/g' $runme ./$runme +# check for basic syntax errors +openroad -exit -no_init vars-mock-array_Element-asap7-base.tcl diff --git a/flow/util/generate-vars.sh b/flow/util/generate-vars.sh index a45a0556e0..0c5a04b5d5 100755 --- a/flow/util/generate-vars.sh +++ b/flow/util/generate-vars.sh @@ -46,13 +46,6 @@ while read -r VAR; do # skip variables that match the exclude patterns continue fi - # handle special case where the variable needs to be splitted in Tcl code - if [[ "${name}" == "GND_NETS_VOLTAGES" || "${name}" == "PWR_NETS_VOLTAGES" ]]; then - echo "export ${name}='${value}'" >> $1.sh - echo "set env(${name}) ${value}" >> $1.tcl - echo "set env ${name} ${value}" >> $1.gdb - continue - fi # convert absolute paths if possible to use FLOW_HOME variable if [[ "${name}" == *"SCRIPTS_DIR"* ]]; then @@ -63,8 +56,8 @@ while read -r VAR; do echo "export ${name}=\"${value}\"" >> $1.sh if [[ "${value}" == *'$'* ]]; then - echo "set env ${name} $(sed -e 's,${FLOW_HOME},getenv("FLOW_HOME"),' <<< ${value})" >> $1.gdb - echo "set env(${name}) \"$(sed -e 's,${FLOW_HOME},$::env(FLOW_HOME),' <<< ${value})\"" >> $1.tcl + echo "set env ${name} $(sed -e 's,${FLOW_HOME},getenv("FLOW_HOME"),g' <<< ${value})" >> $1.gdb + echo "set env(${name}) \"$(sed -e 's,${FLOW_HOME},$::env(FLOW_HOME),g' <<< ${value})\"" >> $1.tcl else echo "set env(${name}) \"${value}\"" >> $1.tcl echo "set env ${name} ${value}" >> $1.gdb diff --git a/flow/util/utils.mk b/flow/util/utils.mk index c1f368bbd9..b9bbcc6075 100644 --- a/flow/util/utils.mk +++ b/flow/util/utils.mk @@ -93,7 +93,7 @@ define \n endef define get_variables -$(foreach V, $(.VARIABLES),$(if $(filter-out $(1), $(origin $V)), $(if $(filter-out .% %QT_QPA_PLATFORM% %TIME_CMD% KLAYOUT% GENERATE_ABSTRACT_RULE% do-step% do-copy% OPEN_GUI% OPEN_GUI_SHORTCUT% SUB_MAKE% UNSET_VARS%, $(V)), $V$ ))) +$(foreach V, $(.VARIABLES),$(if $(filter-out $(1), $(origin $V)), $(if $(filter-out .% %QT_QPA_PLATFORM% %TIME_CMD% KLAYOUT% GENERATE_ABSTRACT_RULE% do-step% do-copy% OPEN_GUI% OPEN_GUI_SHORTCUT% SUB_MAKE% UNSET_VARS% export%, $(V)), $V$ ))) endef export UNSET_VARIABLES_NAMES := $(call get_variables,command% line environment% default automatic)