summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-04-05 12:47:40 +0200
committerKali Kaneko <kali@leap.se>2017-07-07 21:25:04 +0200
commit97ca968e622796e5e783b6e4c410bee36df90803 (patch)
tree94c6c1866009a58295d9528169d3a2915fe4b820
parent0db716a686443d21eb0134f91e4541b9d4a69f82 (diff)
[benchmarks] Run test in docker
-rw-r--r--.gitlab-ci.yml3
-rwxr-xr-xbenchmark-all-commits.sh17
2 files changed, 13 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9387f843..4ab6a25d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -68,6 +68,9 @@ benchmark:
- couchdb
allow_failure: true
script:
+ # We need some files on order to post the right benchmarking data to elasticsearch
+ - git checkout origin/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py
+ - git status
- cd testing
- curl -s couchdb:5984
# You can provide a $NETRC variable containing the creds for your
diff --git a/benchmark-all-commits.sh b/benchmark-all-commits.sh
index 418ed905..d368eff0 100755
--- a/benchmark-all-commits.sh
+++ b/benchmark-all-commits.sh
@@ -18,17 +18,20 @@ while /bin/true
do
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
+ # Option 1: Run couchdb + tox localy - dirty!
+ # 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"
+ #pkill -f -9 tox
+ #git checkout origin/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py
+ #tox -c testing/tox.ini -e benchmark -- -x "$PYTEST_OPTS"
+ #git reset HEAD testing/tox.ini
+ #git checkout testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py
+ # Option 2: Run couchdb + tox in docker container using gitlab-runner
+ git checkout origin/benchmark-all-commits .gitlab-ci.yml
+ gitlab-runner exec docker benchmark --env PYTEST_OPTS="$PYTEST_OPTS" --env HOST_HOSTNAME="$(hostname)"
- git reset HEAD testing/tox.ini
- git checkout testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py
git checkout HEAD^
done