Skip to content

Commit

Permalink
Move tests from .travis.yml to tests/
Browse files Browse the repository at this point in the history
The tests should be runnable from outside Travis CI.
Creating a separate script also makes the YAML lines
simpler, and long comments added to explain the scipts.

Closes #189
Related to #183
  • Loading branch information
jayvdb authored and lherman-cs committed Jun 29, 2017
1 parent cecaaaa commit 6631440
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
25 changes: 4 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,10 @@ install:
script:
- docker images
- >
docker run -t -i coala-docker /bin/sh -c "
set -e -x
export OS_NAME=posix;
cd /coala; python3 -m pytest;
cd /coala-bears;
rm bears/Constants.py; # There are no tests covering this module
rm
bears/c_languages/CSharpLintBear.py
tests/c_languages/CSharpLintBearTest.py
bears/java/InferBear.py
tests/java/InferBearTest.py
bears/haskell/GhcModBear.py
tests/haskell/GhcModBearTest.py;
rm -r
bears/verilog
tests/verilog/;
python3 -m pytest --cov --cov-fail-under=100;
cd /tmp;
svn co https://github.com/githubtraining/hellogitworld.git;
bzr branch lp:govcstestbzrrepo;
hg clone https://bitbucket.org/fracai/empty-hg;
docker run -t -i --volume=$(pwd)/tests:/work coala-docker /bin/sh -c "
set -e -x;
/work/pytest.sh;
/work/vcs.sh;
"
# Verify MarkdownBear works outside of coala-bears directory.
# See https://github.com/coala/coala-bears/issues/1235
Expand Down
13 changes: 13 additions & 0 deletions tests/pytest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e -x

export OS_NAME=posix;
cd /coala; python3 -m pytest;
cd /coala-bears;
rm bears/Constants.py; # There are no tests covering this module
rm bears/c_languages/CSharpLintBear.py tests/c_languages/CSharpLintBearTest.py;
rm bears/java/InferBear.py tests/java/InferBearTest.py;
rm bears/haskell/GhcModBear.py tests/haskell/GhcModBearTest.py;
rm -r bears/verilog tests/verilog/;
python3 -m pytest --cov --cov-fail-under=100;
13 changes: 13 additions & 0 deletions tests/vcs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# This script verifies that VCS fetching is possible,
# even after the Dockerfile ruthlessly removes parts
# of the VCS packages because they have lots of
# unnecessary dependencies for unneeded features.

set -e -x

cd /tmp;
svn co https://github.com/githubtraining/hellogitworld.git;
bzr branch lp:govcstestbzrrepo;
hg clone https://bitbucket.org/fracai/empty-hg;

0 comments on commit 6631440

Please sign in to comment.