aboutsummaryrefslogtreecommitdiffstats
path: root/tests/simple.sh
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2020-03-27 18:54:06 -0400
committerJake Hunsaker <jhunsake@redhat.com>2020-04-08 09:27:31 -0400
commit8b0d7d97e2762004c0bfef2b574b59c063e26877 (patch)
tree7bf55047aaa025225124e201b3947ceaf9f56781 /tests/simple.sh
parent634701f930c091a5e23101af6c9ba79af9c34d1a (diff)
downloadsos-8b0d7d97e2762004c0bfef2b574b59c063e26877.tar.gz
[travis] Update test script for new binary
Updates the test script `simple.sh` used by Travis to use the new `sos` binary with the `report` subcommand. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/simple.sh')
-rwxr-xr-xtests/simple.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/simple.sh b/tests/simple.sh
index 2a6b7a1c..fd4dd8b8 100755
--- a/tests/simple.sh
+++ b/tests/simple.sh
@@ -14,7 +14,7 @@
# * make it better validate archives and contents
PYTHON=${1:-/usr/bin/python3}
-SOSPATH=${2:-./sosreport}
+SOSPATH=${2:-./bin/sos report}
NUMOFFAILURES=0
@@ -23,8 +23,8 @@ run_expecting_sucess () {
#$2 - kind of check to do, so far only extract
FAIL=false
# Make sure clean
- rm -f stderr stdout /tmp/sosreport*.tar.*
- rm -rf /tmp/sosreport_test/
+ rm -f stderr stdout /var/tmp/sosreport*.tar.*
+ rm -rf /var/tmp/sosreport_test/
echo "######### RUNNING $1 #########"
$PYTHON $SOSPATH $1 2> stderr 1> stdout
@@ -50,15 +50,15 @@ run_expecting_sucess () {
if [ "extract" = "$2" ]; then
echo "### start extraction"
- rm -f /tmp/sosreport*md5
- mkdir /tmp/sosreport_test/
- tar xfa /tmp/sosreport*.tar* -C /tmp/sosreport_test --strip-components=1
- if [ -s /tmp/sosreport_test/sos_logs/*errors.txt ]; then
+ rm -f /var/tmp/sosreport*md5
+ mkdir /var/tmp/sosreport_test/
+ tar xfa /var/tmp/sosreport*.tar* -C /var/tmp/sosreport_test --strip-components=1
+ if [ -s /var/tmp/sosreport_test/sos_logs/*errors.txt ]; then
FAIL=true
echo "!!! FAILED !!!"
echo "#### *errors.txt output"
- ls -alh /tmp/sosreport_test/sos_logs/
- cat /tmp/sosreport_test/sos_logs/*errors.txt
+ ls -alh /var/tmp/sosreport_test/sos_logs/
+ cat /var/tmp/sosreport_test/sos_logs/*errors.txt
fi
echo "### stop extraction"
fi