]> rtime.felk.cvut.cz Git - omk.git/blobdiff - tests/default-config
Reworked default-config test
[omk.git] / tests / default-config
index 6e78e41516453a305e63c9a68e78511969b233a7..f5eacf7efd3d41bb5329f32f2d08fdb5abe752c4 100755 (executable)
@@ -1,4 +1,31 @@
 #!/bin/bash
-make || exit 2
-echo "Default config differs" > _error
-diff -u config.omk-correct config.omk-default || exit 1
+
+. ./wvtest.sh
+
+cat > 'Makefile.omk' <<EOF     # This file is included into OMK manual
+default_CONFIG = CONFIG_DEBUG=y CONFIG_SLOW=n
+default_CONFIG += CONFIG_NUM=123 CONFIG_ARCH=arm
+default_CONFIG += CONFIG_QUOTES="Text+quotes"
+
+SUBDIRS=subdir
+EOF
+cat > 'config.omk-correct' <<EOF
+# Start of OMK config file
+# This file should not be altered manually
+# Overrides should be stored in file config.omk
+
+# Config for subdir
+CONFIG_SUBDIR=y
+#CONFIG_DEBUG=x
+# Config for 
+CONFIG_DEBUG=y
+CONFIG_SLOW=n
+CONFIG_NUM=123
+CONFIG_ARCH=arm
+CONFIG_QUOTES="Text+quotes"
+EOF
+mkdir 'subdir'
+echo 'default_CONFIG = CONFIG_SUBDIR=y CONFIG_DEBUG=x' > 'subdir/Makefile.omk'
+omkize
+WVPASS make
+WVPASS diff -u config.omk-correct config.omk-default