summaryrefslogtreecommitdiffstats
path: root/build/pymake/tests/var-overrides.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build/pymake/tests/var-overrides.mk')
-rw-r--r--build/pymake/tests/var-overrides.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/build/pymake/tests/var-overrides.mk b/build/pymake/tests/var-overrides.mk
new file mode 100644
index 000000000..bd0765d19
--- /dev/null
+++ b/build/pymake/tests/var-overrides.mk
@@ -0,0 +1,21 @@
+#T commandline: ['CLINEVAR=clineval', 'CLINEVAR2=clineval2']
+
+# this doesn't actually test overrides yet, because they aren't implemented in pymake,
+# but testing origins in general is important
+
+MVAR = mval
+CLINEVAR = deadbeef
+
+override CLINEVAR2 = mval2
+
+all:
+ test "$(origin NOVAR)" = "undefined"
+ test "$(CLINEVAR)" = "clineval"
+ test "$(origin CLINEVAR)" = "command line"
+ test "$(MVAR)" = "mval"
+ test "$(origin MVAR)" = "file"
+ test "$(@)" = "all"
+ test "$(origin @)" = "automatic"
+ test "$(origin CLINEVAR2)" = "override"
+ test "$(CLINEVAR2)" = "mval2"
+ @echo TEST-PASS