Add fixture for ppc64le (#785)

* Add support for per-architecture fixtures.
* Add output for ppc64le.
This commit is contained in:
Ben Kochie 2018-01-11 13:56:19 +01:00 committed by GitHub
parent bc38ffc538
commit b4d7ba119a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3322 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,13 @@ tmpdir=$(mktemp -d /tmp/node_exporter_e2e_test.XXXXXX)
skip_re="^(go_|node_exporter_build_info|node_scrape_collector_duration_seconds|process_|node_textfile_mtime)" skip_re="^(go_|node_exporter_build_info|node_scrape_collector_duration_seconds|process_|node_textfile_mtime)"
arch="$(uname -m)"
case "${arch}" in
ppc64le) fixture='collector/fixtures/e2e-ppc64le-output.txt' ;;
*) fixture='collector/fixtures/e2e-output.txt' ;;
esac
keep=0; update=0; verbose=0 keep=0; update=0; verbose=0
while getopts 'hkuv' opt while getopts 'hkuv' opt
do do
@ -108,7 +115,7 @@ EOF
if [ ${update} -ne 0 ] if [ ${update} -ne 0 ]
then then
cp "${tmpdir}/e2e-output.txt" "collector/fixtures/e2e-output.txt" cp "${tmpdir}/e2e-output.txt" "${fixture}"
fi fi
if [ ${keep} -eq 0 ] if [ ${keep} -eq 0 ]
@ -141,5 +148,5 @@ sleep 1
get "127.0.0.1:${port}/metrics" | grep -E -v "${skip_re}" > "${tmpdir}/e2e-output.txt" get "127.0.0.1:${port}/metrics" | grep -E -v "${skip_re}" > "${tmpdir}/e2e-output.txt"
diff -u \ diff -u \
"collector/fixtures/e2e-output.txt" \ "${fixture}" \
"${tmpdir}/e2e-output.txt" "${tmpdir}/e2e-output.txt"