Skip to content

Commit

Permalink
Merge pull request #77 from jerryz123/test_file
Browse files Browse the repository at this point in the history
Moved tests to Makefile
  • Loading branch information
jerryz123 committed Jul 11, 2018
2 parents ccf22d8 + 0fd8f35 commit c98e4a5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
21 changes: 1 addition & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,7 @@ env:
# command to run tests
script:
- make -C docs html
- python -m fluids --time 100 -v 0 -o birdseye
- python -m fluids --time 100 -v 0 -o grid
- python -m fluids --time 100 -v 0 -o none

- xvfb-run -a --server-args="-screen 0 1920x1080x16" python -m fluids --time 100 -v 99 -o birdseye
- xvfb-run -a --server-args="-screen 0 1920x1080x16" python -m fluids --time 100 -v 99 -o grid
- xvfb-run -a --server-args="-screen 0 1920x1080x16" python -m fluids --time 100 -v 99 -o none

- xvfb-run -a --server-args="-screen 0 1920x1080x16" python tests/test_gym.py

- coverage run -a --source fluids -m fluids --time 100 -v 0 -o birdseye
- coverage run -a --source fluids -m fluids --time 100 -v 0 -o grid
- coverage run -a --source fluids -m fluids --time 100 -v 0 -o none

- xvfb-run -a --server-args="-screen 0 1920x1080x16" coverage run -a --source fluids -m fluids --time 100 -v 99 -o birdseye
- xvfb-run -a --server-args="-screen 0 1920x1080x16" coverage run -a --source fluids -m fluids --time 100 -v 99 -o grid
- xvfb-run -a --server-args="-screen 0 1920x1080x16" coverage run -a --source fluids -m fluids --time 100 -v 99 -o none

- xvfb-run -a --server-args="-screen 0 1920x1080x16" coverage run -a --source fluids,gym_fluids tests/test_gym.py

- make test
after_success:
- coveralls

Expand Down
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

PY := python
GUI := xvfb-run -a --server-args="-screen 0 1920x1080x16"
COV := coverage run -a --source fluids

test:
$(PY) -m fluids --time 100 -v 0 -o birdseye
$(PY) -m fluids --time 100 -v 0 -o grid
$(PY) -m fluids --time 100 -v 0 -o none
$(GUI) $(PY) -m fluids --time 100 -v 99 -o birdseye
$(GUI) $(PY) -m fluids --time 100 -v 99 -o grid
$(GUI) $(PY) -m fluids --time 100 -v 99 -o none
$(GUI) $(PY) tests/test_gym.py

$(COV) -m fluids --time 100 -v 0 -o birdseye
$(COV) -m fluids --time 100 -v 0 -o grid
$(COV) -m fluids --time 100 -v 0 -o none
$(GUI) $(COV) -m fluids --time 100 -v 99 -o birdseye
$(GUI) $(COV) -m fluids --time 100 -v 99 -o grid
$(GUI) $(COV) -m fluids --time 100 -v 99 -o none
$(GUI) $(COV) tests/test_gym.py


0 comments on commit c98e4a5

Please sign in to comment.