Revision 570274e4
b/Makefile.am | ||
---|---|---|
1535 | 1535 |
|
1536 | 1536 |
.PHONY: hs-check |
1537 | 1537 |
hs-check: htest/test htest/hpc-htools htest/hpc-mon-collector $(HS_BUILT_TEST_HELPERS) |
1538 |
@rm -f test.tix
|
|
1538 |
@rm -f *.tix
|
|
1539 | 1539 |
./htest/test |
1540 | 1540 |
HBINARY="./htest/hpc-htools" ./htest/offline-test.sh |
1541 | 1541 |
|
b/htest/cli-tests-defs.sh | ||
---|---|---|
22 | 22 |
HBINARY=${HBINARY:-./htest/hpc-htools} |
23 | 23 |
|
24 | 24 |
export TESTDATA_DIR=${TOP_SRCDIR:-.}/htest/data |
25 |
export PYTESTDATA_DIR=${TOP_SRCDIR:-.}/test/data |
|
25 | 26 |
|
26 | 27 |
hbal() { |
27 | 28 |
HTOOLS=hbal $HBINARY "$@" |
b/htest/shelltests/htools-mon-collector.test | ||
---|---|---|
2 | 2 |
./htest/hpc-mon-collector |
3 | 3 |
>>>= !0 |
4 | 4 |
|
5 |
# 2. Test that the drbd collector fails parsing /dev/null |
|
5 |
# 2. Test that standard options are accepted, both at top level |
|
6 |
# and subcommands level |
|
7 |
./htest/hpc-mon-collector --help |
|
8 |
>>>= 0 |
|
9 |
|
|
10 |
./htest/hpc-mon-collector --help-completion |
|
11 |
>>>= 0 |
|
12 |
|
|
13 |
./htest/hpc-mon-collector --version |
|
14 |
>>>= 0 |
|
15 |
|
|
16 |
./htest/hpc-mon-collector drbd --help |
|
17 |
>>>= 0 |
|
18 |
|
|
19 |
./htest/hpc-mon-collector drbd --help-completion |
|
20 |
>>>= 0 |
|
21 |
|
|
22 |
./htest/hpc-mon-collector drbd --version |
|
23 |
>>>= 0 |
|
24 |
|
|
25 |
# 3. Test that the drbd collector fails parsing /dev/null |
|
6 | 26 |
./htest/hpc-mon-collector drbd /dev/null |
7 | 27 |
>>>2 |
8 | 28 |
Error: "" |
... | ... | |
10 | 30 |
Failed reading: versionInfo |
11 | 31 |
>>>= !0 |
12 | 32 |
|
13 |
# 3. Test that the drbd collector fails parsing /dev/zero, but is not |
|
33 |
# 4. Test that a non-existent file is correctly reported |
|
34 |
./htest/hpc-mon-collector drbd /dev/no-such-file |
|
35 |
>>>2/Error: reading from file: .* does not exist/ |
|
36 |
>>>= !0 |
|
37 |
|
|
38 |
# 5. Test that multiple files are rejected |
|
39 |
./htest/hpc-mon-collector drbd /dev/null /dev/null |
|
40 |
>>>2/takes only one argument/ |
|
41 |
>>>= !0 |
|
42 |
|
|
43 |
# 6. Test that a standard test file is parsed correctly |
|
44 |
./htest/hpc-mon-collector drbd $PYTESTDATA_DIR/proc_drbd83.txt |
|
45 |
>>>=0 |
|
46 |
|
|
47 |
# 7. Test that the drbd collector fails parsing /dev/zero, but is not |
|
14 | 48 |
# stuck forever printing \NUL chars |
15 | 49 |
./htest/hpc-mon-collector drbd /dev/zero |
16 | 50 |
>>>2 |
Also available in: Unified diff