]> rtime.felk.cvut.cz Git - omk.git/blob - tests/headers/generated/runtest
6979c56bc9a478b6fdba377afc2ca64ed6ff0ca8
[omk.git] / tests / headers / generated / runtest
1 #!/bin/sh
2
3 source ../../functions.sh
4
5 make default-config || canttest
6 make include-pass || error "Can't run make include-pass"
7
8 GC=./_compiled/include/global.h
9 test -f "$GC" || canttest "Can't find the produced global config"
10
11 grep -Fv "/* config file:" $GC | diff -u correct/global.h - || error "Global config differs"
12
13 make || canttest "Can't run make to produce local config"
14 make CFLAGS=-Wall || canttest "Make failed with custom CFLAGS"
15 LC=$(find _build -wholename '*/lincan/lincan_config.h')
16 test -f "$LC" || canttest "Can't find the produced local config"
17 grep -Fv "/* config file:" $LC | diff -u correct/lincan_config.h - || error "Local config differs"
18
19 stat -c '%z' $LC > stat.log1
20 sleep 1
21 touch config.omk-default
22 make
23 stat -c '%z' $LC > stat.log2
24 diff stat.log1 stat.log2 || error "Generated config changed without without reason"