root / htools / offline-test.sh @ 42089b55
History | View | Annotate | Download (1.1 kB)
1 | 42089b55 | Iustin Pop | #!/bin/bash |
---|---|---|---|
2 | 42089b55 | Iustin Pop | |
3 | 42089b55 | Iustin Pop | # Copyright (C) 2012 Google Inc. |
4 | 42089b55 | Iustin Pop | |
5 | 42089b55 | Iustin Pop | # This program is free software; you can redistribute it and/or modify |
6 | 42089b55 | Iustin Pop | # it under the terms of the GNU General Public License as published by |
7 | 42089b55 | Iustin Pop | # the Free Software Foundation; either version 2 of the License, or |
8 | 42089b55 | Iustin Pop | # (at your option) any later version. |
9 | 42089b55 | Iustin Pop | |
10 | 42089b55 | Iustin Pop | # This program is distributed in the hope that it will be useful, but |
11 | 42089b55 | Iustin Pop | # WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | 42089b55 | Iustin Pop | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | 42089b55 | Iustin Pop | # General Public License for more details. |
14 | 42089b55 | Iustin Pop | |
15 | 42089b55 | Iustin Pop | # You should have received a copy of the GNU General Public License |
16 | 42089b55 | Iustin Pop | # along with this program; if not, write to the Free Software |
17 | 42089b55 | Iustin Pop | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
18 | 42089b55 | Iustin Pop | # 02110-1301, USA. |
19 | 42089b55 | Iustin Pop | |
20 | 42089b55 | Iustin Pop | # This is an offline testing script for most/all of the htools |
21 | 42089b55 | Iustin Pop | # programs, checking basic command line functionality. |
22 | 42089b55 | Iustin Pop | |
23 | 42089b55 | Iustin Pop | set -e |
24 | 42089b55 | Iustin Pop | |
25 | 42089b55 | Iustin Pop | . $(dirname $0)/cli-tests-defs.sh |
26 | 42089b55 | Iustin Pop | |
27 | 42089b55 | Iustin Pop | echo -n "Checking command line basic options " |
28 | 42089b55 | Iustin Pop | for prog in $ALL_ROLES; do |
29 | 42089b55 | Iustin Pop | echo -n "." |
30 | 42089b55 | Iustin Pop | $prog --version >/dev/null |
31 | 42089b55 | Iustin Pop | $prog --help >/dev/null |
32 | 42089b55 | Iustin Pop | ! $prog --no-such-option 2>/dev/null |
33 | 42089b55 | Iustin Pop | done |
34 | 42089b55 | Iustin Pop | echo |
35 | 42089b55 | Iustin Pop | |
36 | 42089b55 | Iustin Pop | echo All OK |