summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-04-05 12:47:40 +0200
committerdrebs <drebs@leap.se>2017-07-03 14:19:43 -0300
commitb2372217a1d6f40b64f2afbb734571ae14c0e27c (patch)
tree000795aebc8ad0219101592201fc20cbb08d643e
parent310743e108226159af054777a28f98f9e79bd554 (diff)
[test] 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