You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by zh...@apache.org on 2018/05/07 12:49:12 UTC
[2/3] incubator-singa git commit: SINGA-354 Update travis scripts to
use conda-build for all platforms
SINGA-354 Update travis scripts to use conda-build for all platforms
Add xmlrunner into conda dependency list
update XMLTestRunner args to fix running bugs
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/4b3a914b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/4b3a914b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/4b3a914b
Branch: refs/heads/master
Commit: 4b3a914b84fc73f0b2e8d9c0ab10cdcd61fcfe92
Parents: faa22f7
Author: Wang Wei <dc...@nus.edu.sg>
Authored: Sat May 5 23:22:29 2018 +0800
Committer: Wang Wei <dc...@nus.edu.sg>
Committed: Sun May 6 23:09:12 2018 +0800
----------------------------------------------------------------------
test/python/run.py | 6 ++----
tool/conda/meta.yaml | 1 +
tool/travis/build.sh | 10 ++++------
3 files changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/4b3a914b/test/python/run.py
----------------------------------------------------------------------
diff --git a/test/python/run.py b/test/python/run.py
index 8f7a45f..ef2c671 100644
--- a/test/python/run.py
+++ b/test/python/run.py
@@ -22,8 +22,6 @@ import xmlrunner
loader = unittest.TestLoader()
tests = loader.discover('.')
# testRunner = unittest.runner.TextTestRunner()
-with open('unittest.xml', 'wb') as output:
- testRunner = xmlrunner.XMLTestRunner(output=output,
- failfast=False,
- buffer=False)
+with open('unittest.xml', 'w') as output:
+ testRunner = xmlrunner.XMLTestRunner(output=output)
testRunner.run(tests)
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/4b3a914b/tool/conda/meta.yaml
----------------------------------------------------------------------
diff --git a/tool/conda/meta.yaml b/tool/conda/meta.yaml
index de542cd..9b9b3f5 100644
--- a/tool/conda/meta.yaml
+++ b/tool/conda/meta.yaml
@@ -36,6 +36,7 @@ requirements:
- flask-cors >=3.0.2
- pillow >=2.3.0
- future >=0.16.0
+ - xmlrunner 1.7.7
test:
source_files:
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/4b3a914b/tool/travis/build.sh
----------------------------------------------------------------------
diff --git a/tool/travis/build.sh b/tool/travis/build.sh
index 6191ba4..96af82c 100644
--- a/tool/travis/build.sh
+++ b/tool/travis/build.sh
@@ -31,17 +31,15 @@ export CONDA_BLD_PATH=~/conda-bld-$suffix
mkdir $CONDA_BLD_PATH
conda build tool/conda/ --python 3.6
+conda install --use-local singa
+cd test/python
+python run.py
if [[ "$TRAVIS_SECURE_ENV_VARS" == "false" ]];
# install and run unittest
then
- conda install --use-local
- cd test/python
- python run.py
+ echo "no uploading if ANACONDA_UPLOAD_TOKEN not set"
else
- conda install --use-local
- cd test/python
- python run.py
# turn off debug to hide the token in travis log
set +x
# upload the package onto anaconda cloud