summaryrefslogtreecommitdiff
path: root/tests/Klocation
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-05-14 18:00:40 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-05-16 19:42:56 +0200
commitcbf32e29a130d22bc734b7778e6304ac9df2a3e8 (patch)
tree458699338def9b21680ac958889f51403652362c /tests/Klocation
parent0bc5961d8e9f49629e33a7193dc921b064ba1587 (diff)
Expand environment variables in strings directly
Make "$FOO" directly reference the environment variable $FOO in e.g. 'source' statements, instead of the symbol FOO. Use os.path.expandvars() to expand strings (which preserves "$FOO" as-is if no environment variable FOO exists). This gets rid of the 'option env' "bounce" symbols, which are mostly just spam and are buggy in the C tools (dependencies aren't always respected, due to parsing and evaluation getting mixed up). The same change will probably appear soon in the C tools as well. Keep accepting 'option env' to preserve some backwards compatibility, but ignore it when expanding strings. For compatibility with the C tools, bounce symbols will need to be named the same as the environment variables they reference (which is the case for the Linux kernel). This is a compatibility break, so the major version will be bumped to 6 at the next release. The main motivation for adding this now is to allow recording properties on each MenuNode in a clean way. 'option env' symbols interact badly with delayed dependency propagation. Side note: I have a feeling that recording environment variable values might be redundant to trigger rebuilds if sync_deps() is run at each compile. It should detect all changes to symbol values due to environment variables changing value.
Diffstat (limited to 'tests/Klocation')
-rw-r--r--tests/Klocation24
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/Klocation b/tests/Klocation
index d3ac09c..6438739 100644
--- a/tests/Klocation
+++ b/tests/Klocation
@@ -33,30 +33,6 @@ config MULTI_DEF
endif
endif
-config TESTS_DIR_FROM_ENV
- string
- option env="TESTS_DIR_FROM_ENV"
-
-config SUB_DIR_FROM_ENV
- string
- option env="SUB_DIR_FROM_ENV"
-
-config _SOURCED
- string
- default "_sourced"
-
-config _RSOURCED
- string
- default "_rsourced"
-
-config _GSOURCED
- string
- default "_gsourced"
-
-config _GRSOURCED
- string
- default "_grsourced"
-
# Expands to "tests/Klocation_sourced"
source "$TESTS_DIR_FROM_ENV/Klocation$_SOURCED"