]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Added test for 'x' in generated headers.
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 23 Oct 2007 11:07:00 +0000 (11:07 +0000)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 23 Oct 2007 11:07:00 +0000 (11:07 +0000)
darcs-hash:20071023110738-f2ef6-3feade67421080da0742b1610c4c727e686f9ec9.gz

tests/headers/generated/Makefile.omk
tests/headers/generated/config.omk-default
tests/headers/generated/correct/toplevel_config.h [new file with mode: 0644]
tests/headers/generated/runtest
tests/headers/generated/runtest-default-cflags

index 6e2ddbb93f30495f8407245799dbd6b13c5b089e..890c2138bfe85a6f7bdc01271025494e2aa041cb 100644 (file)
@@ -2,6 +2,9 @@ SUBDIRS=lincan
 
 default_CONFIG = CONFIG_TEST_NUM=123 CONFIG_TEST_STR=Hello
 default_CONFIG += CONFIG_TEST_APOS="Text+apostrophes"
+default_CONFIG += CONFIG_OC_LINCAN=x CONFIG_UNKNOWN=x
+
+LOCAL_CONFIG_H = toplevel_config.h
 
 config_include_HEADERS = global.h
 
index b8c66f6ba6be94f3a9b9311157047e0b0c8f404b..cacb9ae08c82693c9e7d3de888e603a80fd65870 100644 (file)
@@ -42,3 +42,5 @@ CONFIG_OC_LINCAN_CARD_nsi_canpci=n
 CONFIG_TEST_NUM=123
 CONFIG_TEST_STR=Hello
 CONFIG_TEST_APOS="Text+apostrophes"
+#CONFIG_OC_LINCAN=x
+#CONFIG_UNKNOWN=x
diff --git a/tests/headers/generated/correct/toplevel_config.h b/tests/headers/generated/correct/toplevel_config.h
new file mode 100644 (file)
index 0000000..80c4589
--- /dev/null
@@ -0,0 +1,9 @@
+/* Automatically generated from */
+/* config file: /home/sojka/devel/omk/tests/headers/generated/config.omk-default */
+#ifndef _LOCAL_CONFIG_H
+#define _LOCAL_CONFIG_H
+#define CONFIG_TEST_NUM 123
+#define CONFIG_TEST_STR Hello
+#define CONFIG_TEST_APOS "Text+apostrophes"
+#define CONFIG_OC_LINCAN 1
+#endif /*_LOCAL_CONFIG_H*/
index 6979c56bc9a478b6fdba377afc2ca64ed6ff0ca8..2576a1652b9068fd764dbeac93b1478adee4905f 100755 (executable)
@@ -16,6 +16,10 @@ LC=$(find _build -wholename '*/lincan/lincan_config.h')
 test -f "$LC" || canttest "Can't find the produced local config"
 grep -Fv "/* config file:" $LC | diff -u correct/lincan_config.h - || error "Local config differs"
 
+TLC=$(find _build -name 'toplevel_config.h')
+test -f "$TLC" || canttest "Can't find the produced local config"
+grep -Fv "/* config file:" $TLC | diff -u correct/toplevel_config.h - || error "Toplevel local config differs"
+
 stat -c '%z' $LC > stat.log1
 sleep 1
 touch config.omk-default
index a62df0318ce54e80059a390b074f6bbc450b009a..0e7313c0ceb694a888106c72a2ac0112f090b28d 100755 (executable)
@@ -4,5 +4,8 @@ source ../../functions.sh
 
 make default-config || canttest
 
+make distclean
+LC_MESSAGES=C
+export LC_MESSAGES
 make 2> stderr || canttest
 grep "control reaches end of non-void function" stderr || error "Default CFLAGS are not applied"