diff options
author | varac <varacanero@zeromail.org> | 2017-04-05 11:27:59 +0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-07-03 14:19:40 -0300 |
commit | 310743e108226159af054777a28f98f9e79bd554 (patch) | |
tree | e9654e6128ab4efad7eb5e4c08caec6cdb3de832 /benchmark-all-commits.sh | |
parent | 4ef9bf730bc87aefe8c7b3f326969c4f8916e0a6 (diff) |
[test] Improve benchmark-all-commits.sh script
Diffstat (limited to 'benchmark-all-commits.sh')
-rwxr-xr-x | benchmark-all-commits.sh | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/benchmark-all-commits.sh b/benchmark-all-commits.sh index f4367991..418ed905 100755 --- a/benchmark-all-commits.sh +++ b/benchmark-all-commits.sh @@ -1,24 +1,34 @@ -#!/bin/sh -x +#!/bin/bash -x # # Go backwards in git history and run benchmark tests # Export PYTEST_OPTS so pytest will post metrics to an elasticsearch # instance, i.e. # # export PYTEST_OPTS='--benchmark-autosave --benchmark-storage="elasticsearch+https://USER:PASSWORD@moose.leap.se:9200"' - +# or, for testing a single test group: +# export PYTEST_OPTS='--benchmark-autosave --benchmark-storage="elasticsearch+https://USER:PASSWORD@moose.leap.se:9200" -m benchmark_test_instance' +# # Todo # # - Error handling. This script is dump and will run forever. -rm -rf testing/.tox +#rm -rf testing/.tox while /bin/true do - git checkout HEAD testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py + echo -e '\n\n\n\n\n' + + git checkout origin/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py + + curl -s localhost:5984 || exit 1 + + # Make sure we kill all leftover soledad server/pytest procs + pkill -f -9 tox + tox -c testing/tox.ini -e benchmark -- -x "$PYTEST_OPTS" + #gitlab-runner exec docker benchmark --env PYTEST_OPTS="$PYTEST_OPTS" - tox -c testing/tox.ini -e benchmark -- -x $PYTEST_OPTS git reset HEAD testing/tox.ini - git checkout testing/tox.ini + git checkout testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py git checkout HEAD^ done |