| 1 | #!/bin/sh |
| 2 | |
| 3 | # test that kconfig-frontend is able to parse Kconfig file properly |
| 4 | # list its options and generate a random config without error |
| 5 | |
| 6 | set -e |
| 7 | |
| 8 | WORKDIR=`mktemp -d` |
| 9 | |
| 10 | cat> $WORKDIR/Kconfig << EOF |
| 11 | mainmenu "test" |
| 12 | |
| 13 | config TEST1 |
| 14 | bool "test1 value" |
| 15 | |
| 16 | config TEST2 |
| 17 | int "test2 value" |
| 18 | |
| 19 | if TEST1 |
| 20 | |
| 21 | config TEST3 |
| 22 | bool "test3 value" |
| 23 | |
| 24 | endif |
| 25 | EOF |
| 26 | |
| 27 | cd $WORKDIR; |
| 28 | |
| 29 | kconfig-conf --listnewconfig Kconfig >/dev/null 2>&1; |
| 30 | kconfig-conf --randconfig Kconfig >/dev/null 2>&1; |
| 31 | |
| 32 | # cleaning |
| 33 | cd - |
| 34 | rm -rf $WORKDIR; |