postgres_exporter/postgres_exporter_integration_test_script
Will Rouesnel 989489096e Refactor repository layout and convert build system to Mage.
This commit implements a massive refactor of the repository, and
moves the build system over to use Mage (magefile.org) which should
allow seamless building across multiple platforms.
2018-03-06 07:29:35 +10:00

19 lines
384 B
Bash
Executable File

#!/bin/bash
# This script wraps the integration test binary so it produces concatenated
# test output.
test_binary=$1
shift
output_cov=$1
shift
echo "Test Binary: $test_binary" 1>&2
echo "Coverage File: $output_cov" 1>&2
echo "mode: count" > $output_cov
test_cov=$(mktemp)
$test_binary -test.coverprofile=$test_cov $@ || exit 1
tail -n +2 $test_cov >> $output_cov
rm -f $test_cov