| 1 | #!/bin/dash |
| 2 | |
| 3 | # Copyright (C) 2011 Loïc Minier <[email protected]> |
| 4 | |
| 5 | # This program is free software; you can redistribute it and/or |
| 6 | # modify it under the terms of the GNU General Public License |
| 7 | # as published by the Free Software Foundation; either version 2 |
| 8 | # of the License, or (at your option) any later version. |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # You should have received a copy of the GNU General Public License |
| 16 | # along with this program; if not, write to the Free Software |
| 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, |
| 18 | # USA. |
| 19 | |
| 20 | . ./testlib |
| 21 | |
| 22 | flash_kernel="${FK_CHECKOUT:-$FK_DIR}/flash-kernel" |
| 23 | |
| 24 | test_syntax() { |
| 25 | sh -n "$flash_kernel" |
| 26 | } |
| 27 | add_test test_syntax |
| 28 | |
| 29 | skip_test_bashisms() { |
| 30 | if which checkbashisms 2>&1 >/dev/null; then |
| 31 | return 1 |
| 32 | fi |
| 33 | return 0 |
| 34 | } |
| 35 | |
| 36 | test_bashisms() { |
| 37 | checkbashisms "$flash_kernel" |
| 38 | } |
| 39 | add_test test_bashisms |
| 40 | |
| 41 | |
| 42 | test_main |
| 43 | |
| 44 | # vim:syntax=sh |