summaryrefslogtreecommitdiff
path: root/tests/Klocation
diff options
context:
space:
mode:
authorRoman <ztcoils@gmail.com>2018-02-27 10:04:36 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2018-02-27 09:04:36 +0100
commitaea0232a56d9a9d2611b79ea9c67e0d9d49b183f (patch)
tree8460f167baa395761417259eec3326db937e651d /tests/Klocation
parent17026039bd81da7305b35c3d13b8d9cf45924a50 (diff)
Implement 'rsource' statement ('source' with relative path)
The 'rsource' statement works like 'source', but looks relative to the Kconfig file that has the 'rsource' rather than relative to the base Kconfig file. Using 'rsource' makes it possible to move subtrees with Kconfig files around without breaking references to other Kconfig files. So far, this is a Kconfiglib-exclusive feature.
Diffstat (limited to 'tests/Klocation')
-rw-r--r--tests/Klocation22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/Klocation b/tests/Klocation
index 00d4f4a..aa176b2 100644
--- a/tests/Klocation
+++ b/tests/Klocation
@@ -33,15 +33,25 @@ config MULTI_DEF
endif
endif
-config EXPANDED_FROM_ENV
+config TESTS_DIR_FROM_ENV
string
- option env="EXPANDED_FROM_ENV"
+ option env="TESTS_DIR_FROM_ENV"
-config _INCLUDED
+config SUB_DIR_FROM_ENV
string
- default "_included"
+ option env="SUB_DIR_FROM_ENV"
-# Expands to "tests/Klocation_included"
-source "$EXPANDED_FROM_ENV/Klocation$_INCLUDED"
+config _SOURCED
+ string
+ default "_sourced"
+
+config _RSOURCED
+ string
+ default "_rsourced"
+
+# Expands to "tests/Klocation_sourced"
+source "$TESTS_DIR_FROM_ENV/Klocation$_SOURCED"
+# Expands to "sub/Klocation_rsourced"
+rsource "$SUB_DIR_FROM_ENV/Klocation$_RSOURCED"
config MULTI_DEF