提交 008db9d9 authored 作者: Frederic's avatar Frederic

Run Theano tests from inside Theano dir to prevent the theano-nose import problem.

上级 f895fcd6
...@@ -18,8 +18,8 @@ if [ "$1" == "--buildbot" ]; then ...@@ -18,8 +18,8 @@ if [ "$1" == "--buildbot" ]; then
FLAGS=compiledir=$COMPILEDIR FLAGS=compiledir=$COMPILEDIR
cd ${ROOT_CWD}/Theano cd ${ROOT_CWD}/Theano
git rev-parse HEAD git rev-parse HEAD
cd .. #Run tests from inside the Theano directory to prevent import problem.
ARGS="Theano" ARGS=""
PROFILING="--with-coverage --cover-package=theano" PROFILING="--with-coverage --cover-package=theano"
NOSETESTS=${ROOT_CWD}/Theano/bin/theano-nose NOSETESTS=${ROOT_CWD}/Theano/bin/theano-nose
export PYTHONPATH=${ROOT_CWD}:$PYTHONPATH export PYTHONPATH=${ROOT_CWD}:$PYTHONPATH
......
...@@ -18,12 +18,13 @@ need_reload = False ...@@ -18,12 +18,13 @@ need_reload = False
def try_import(): def try_import():
global scan_perform
sys.path[0:0] = [config.compiledir] sys.path[0:0] = [config.compiledir]
import scan_perform import scan_perform
del sys.path[0] del sys.path[0]
def try_reload() def try_reload():
sys.path[0:0] = [config.compiledir] sys.path[0:0] = [config.compiledir]
reload(scan_perform) reload(scan_perform)
del sys.path[0] del sys.path[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论