-
Notifications
You must be signed in to change notification settings - Fork 9
/
test_all
executable file
·50 lines (39 loc) · 960 Bytes
/
test_all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#do cleanup
rm ../omi/Unix/output/etc/omiregister/root-cimv2/Number.reg
rm ../omi/Unix/output/etc/omiregister/root-cimv2/NumberCXX.reg
pushd testcli 1>/dev/null 2>&1
CLI_SAMPLES=`ls ../samples`
TESTS_PASSED=0
LOG_PATH=$1
for DIRECTORY in $CLI_SAMPLES; do
./test $DIRECTORY $LOG_PATH
TEST_RESULT=$?
if [ "$TEST_RESULT" = "0" ]; then
echo "Test $DIRECTORY passed!"
else
echo "Test $DIRECTORY failed!"
TESTS_PASSED=1
fi
echo ""
echo ""
done
sudo ./test_full $LOG_PATH
TEST_RESULT=$?
if [ "$TEST_RESULT" = "0" ]; then
echo "Full CLI Test passed!"
else
echo "Full CLI Test failed!"
TESTS_PASSED=1
fi
popd 1>/dev/null 2>&1
echo "!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!"
if [ "$TESTS_PASSED" = "0" ]; then
echo "!!!CLI tests passed!!!!"
else
echo "!!!CLI tests failed!!!!"
fi
echo "!!!!!!!!!!!!!!!!!!!!!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!"
exit $TESTS_PASSED