Improve end-to-end test output

pull/141/head
Tobias Schmidt 10 years ago
parent 500340bdde
commit e782412a03
  1. 2
      .travis.yml
  2. 8
      end-to-end-test.sh

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

@ -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

Loading…
Cancel
Save