Skip to content

Commit

Permalink
skip performance test if we cant get a baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerhards committed Nov 30, 2016
1 parent c83b157 commit b3b383a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ before_script:

script:
- if [ "$CC" == "clang" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then scan-build-3.6 --status-bugs make check TESTS="" && make clean ; fi
- sudo apt-cache search callgrind
- make
- valgrind --tool callgrind ls
- export VERBOSE=1
Expand Down
5 changes: 5 additions & 0 deletions tests/perf_to_string.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
# first, get baseline from system-installed library
rm -f callgrind.out &> /dev/null
valgrind --tool=callgrind --callgrind-out-file=callgrind.out .libs/perf_to_string
if [ $? -ne 0 ]; then
echo "Error obtaining performance baseline, assuming system is not able to"
echo "support this test - skipping"
exit 77
fi
export RETCODE=$?
echo return code $RETCODE
MAXCYCLES=$(grep < callgrind.out "^totals:" | tr -dc '0-9')
Expand Down

0 comments on commit b3b383a

Please sign in to comment.