Skip to content

Commit

Permalink
Added coverage parallel test for pyDAFoam.
Browse files Browse the repository at this point in the history
  • Loading branch information
friedenhe committed Aug 15, 2020
1 parent fba6e1d commit f64a2ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ jobs:
- docker exec -it regtest /bin/bash -c ". /home/dafoamuser/setupDAFoam.sh && cd $DOCKER_WORKING_DIR && ./Allmake incompressible && rm -rf $DOCKER_PIP_INSTALL_PATH/dafoam* && pip install ."
# install coveralls and coverage
- docker exec -it regtest /bin/bash -c "pip install coveralls --user && pip install coverage --user"
# serial test
- docker exec -it regtest /bin/bash -c ". /home/dafoamuser/setupDAFoam.sh && cd $DOCKER_WORKING_DIR/tests && coverage run --include=$DOCKER_PIP_INSTALL_PATH/dafoam/pyDAFoam.py runTests_DASimpleFoam.py noCheckVal"
# run coveralls
- docker exec -it -e TRAVIS="$TRAVIS" -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" regtest /bin/bash -c ". /home/dafoamuser/setupDAFoam.sh && cd $DOCKER_WORKING_DIR/tests && COVERALLS_PARALLEL=true coveralls"
# parallel test
- docker exec -it regtest /bin/bash -c ". /home/dafoamuser/setupDAFoam.sh && cd $DOCKER_WORKING_DIR/tests && mpirun -np 4 coverage run --include=$DOCKER_PIP_INSTALL_PATH/dafoam/pyDAFoam.py runTests_DASimpleFoam.py noCheckVal"
# combine and run coveralls
- docker exec -it -e TRAVIS="$TRAVIS" -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" regtest /bin/bash -c ". /home/dafoamuser/setupDAFoam.sh && cd $DOCKER_WORKING_DIR/tests && coverage combine && COVERALLS_PARALLEL=true coveralls"

after_script:
- docker rm -f regtest
2 changes: 2 additions & 0 deletions tests/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[coverage:run]
parallel = true

0 comments on commit f64a2ba

Please sign in to comment.