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