Skip to content

Commit

Permalink
test pipeline, alter to return exit code of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
3dprintscanner committed May 4, 2019
1 parent a7027dd commit 44b5e4a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions test/python/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

import sys
import unittest
# import xmlrunner
def main():
loader = unittest.TestLoader()
tests = loader.discover('.')
testRunner = unittest.runner.TextTestRunner()
# testRunner = xmlrunner.XMLTestRunner(output='.')
ret = not testRunner.run(tests).wasSuccessful()
sys.exit(ret)


loader = unittest.TestLoader()
tests = loader.discover('.')
testRunner = unittest.runner.TextTestRunner()
# testRunner = xmlrunner.XMLTestRunner(output='.')
testRunner.run(tests)
if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions tool/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ conda build tool/conda/singa --python 3.6
conda install --use-local singa
cd test/python
$HOME/miniconda/bin/python run.py
echo $?

if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]];
# install and run unittest
Expand Down

0 comments on commit 44b5e4a

Please sign in to comment.