Skip to content

Commit

Permalink
Merge pull request #4592 from freedomofpress/ci-crank-dat-parallelism
Browse files Browse the repository at this point in the history
ci: export junit XML test metadata
  • Loading branch information
emkll authored Jul 16, 2019
2 parents 4448d87 + 3b50abd commit 0dec74f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
25 changes: 8 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ jobs:
- *p2saveimagelayers
- *p2savecache

- run:
name: Make test results directory
command: mkdir -p ~/test-results

- run:
name: Run tests
no_output_timeout: 20m
Expand All @@ -157,10 +153,10 @@ jobs:
PYTHON_VERSION=2 DOCKER_RUN_ARGUMENTS=$(bash <(curl -s https://codecov.io/env)) DOCKER_BUILD_ARGUMENTS="--cache-from securedrop-test-xenial-py2:${fromtag:-latest}" make test
- store_test_results:
path: ~/test-results
path: ~/project/test-results

- store_artifacts:
path: ~/test-results
path: ~/project/test-results

python3-app-tests:
machine:
Expand All @@ -180,10 +176,6 @@ jobs:
- *saveimagelayers
- *savecache

- run:
name: Make test results directory
command: mkdir -p ~/test-results

- run:
name: Run tests
command: |
Expand All @@ -194,10 +186,10 @@ jobs:
DOCKER_BUILD_ARGUMENTS="--cache-from securedrop-test-xenial-py3:${fromtag:-latest}" make test
- store_test_results:
path: ~/test-results
path: ~/project/test-results

- store_artifacts:
path: ~/test-results
path: ~/project/test-results

translation-tests:
machine:
Expand All @@ -216,10 +208,6 @@ jobs:
- *saveimagelayers
- *savecache

- run:
name: Make test results directory
command: mkdir -p ~/test-results

- run:
name: Run tests
command: |
Expand All @@ -230,7 +218,10 @@ jobs:
DOCKER_BUILD_ARGUMENTS="--cache-from securedrop-test-xenial-py3:${fromtag:-latest}" make translation-test
- store_test_results:
path: ~/test-results
path: ~/project/test-results

- store_artifacts:
path: ~/project/test-results

admin-tests:
docker:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ignore the test-results directory which is used to share logs and
# test files with the development containers
test-results

# ignore the production config files that don't end in .example
securedrop-app-conf.yml
securedrop-mon-conf.yml
Expand Down
12 changes: 6 additions & 6 deletions securedrop/bin/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ maybe_create_config_py
if [ -n "${CIRCLE_BRANCH:-}" ] ; then
touch tests/log/firefox.log
function finish {
cp tests/log/firefox.log /tmp/test-results/logs/
cp tests/log/firefox.log ../test-results
bash <(curl -s https://codecov.io/bash)
}
trap finish EXIT
fi

mkdir -p "/tmp/test-results/logs"
mkdir -p "../test-results"

: "${PAGE_LAYOUT_LOCALES:=en_US,ar}"
export PAGE_LAYOUT_LOCALES
Expand All @@ -36,10 +36,10 @@ pytest \
--force-flaky --max-runs=3 \
--page-layout \
--durations 10 \
--junitxml=/tmp/test-results/junit.xml \
--junitxml=../test-results/junit.xml \
--cov-report term-missing \
--cov-report html:/tmp/test-results/cov_html \
--cov-report xml:/tmp/test-results/cov.xml \
--cov-report annotate:/tmp/test-results/cov_annotate \
--cov-report html:../test-results/cov_html \
--cov-report xml:../test-results/cov.xml \
--cov-report annotate:../test-results/cov_annotate \
--cov=. \
"$@"

0 comments on commit 0dec74f

Please sign in to comment.