Improve end-to-end test output

This commit is contained in:
Tobias Schmidt 2015-10-16 15:39:12 -04:00
parent 500340bdde
commit e782412a03
2 changed files with 8 additions and 2 deletions

View file

@ -14,4 +14,4 @@ script:
- go vet
- go test -v ./...
- go build
- ./end-to-end-test.sh -v
- ./end-to-end-test.sh

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set +euf +o pipefail
set -euf +o pipefail
cd "$(dirname $0)"
@ -33,6 +33,11 @@ do
esac
done
if [ ! -x ./node_exporter ]
then
echo './node_exporter not found. Consider running `go build` first.' >&2
exit 1
fi
./node_exporter \
-collector.procfs="collector/fixtures/proc" \
@ -62,6 +67,7 @@ finish() {
then
kill -9 "$(cat ${tmpdir}/node_exporter.pid)"
# This silences the "Killed" message
set +e
wait "$(cat ${tmpdir}/node_exporter.pid)" > /dev/null 2>&1
rm -rf "${tmpdir}"
fi