mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-28 15:09:45 -08:00
Improve end-to-end test output
This commit is contained in:
parent
500340bdde
commit
e782412a03
|
@ -14,4 +14,4 @@ script:
|
||||||
- go vet
|
- go vet
|
||||||
- go test -v ./...
|
- go test -v ./...
|
||||||
- go build
|
- go build
|
||||||
- ./end-to-end-test.sh -v
|
- ./end-to-end-test.sh
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set +euf +o pipefail
|
set -euf +o pipefail
|
||||||
|
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
|
|
||||||
|
@ -33,6 +33,11 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ ! -x ./node_exporter ]
|
||||||
|
then
|
||||||
|
echo './node_exporter not found. Consider running `go build` first.' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
./node_exporter \
|
./node_exporter \
|
||||||
-collector.procfs="collector/fixtures/proc" \
|
-collector.procfs="collector/fixtures/proc" \
|
||||||
|
@ -62,6 +67,7 @@ finish() {
|
||||||
then
|
then
|
||||||
kill -9 "$(cat ${tmpdir}/node_exporter.pid)"
|
kill -9 "$(cat ${tmpdir}/node_exporter.pid)"
|
||||||
# This silences the "Killed" message
|
# This silences the "Killed" message
|
||||||
|
set +e
|
||||||
wait "$(cat ${tmpdir}/node_exporter.pid)" > /dev/null 2>&1
|
wait "$(cat ${tmpdir}/node_exporter.pid)" > /dev/null 2>&1
|
||||||
rm -rf "${tmpdir}"
|
rm -rf "${tmpdir}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue