From e01966f847d1c81aa832f295a7b9237638f3b687 Mon Sep 17 00:00:00 2001 From: Hongsheng Zeng Date: Wed, 24 Apr 2019 18:58:31 +0800 Subject: [PATCH] add test for import parl (#73) * add test for import parl * fix error of check_style * change pip source * refine naming --- .teamcity/Dockerfile | 2 +- .teamcity/build.sh | 23 +++++++++++++++++++++++ CMakeLists.txt | 32 +++++++++++++++++++++++++++----- parl/tests/import_test.py | 24 ++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 parl/tests/import_test.py diff --git a/.teamcity/Dockerfile b/.teamcity/Dockerfile index e5422e8..ca88356 100644 --- a/.teamcity/Dockerfile +++ b/.teamcity/Dockerfile @@ -15,7 +15,7 @@ # A dev image based on paddle production image -FROM parl/parl-test:1.1-cuda9.0-cudnn7 +FROM parl/parl-test:1.1-cuda9.0-cudnn7-v2 COPY ./requirements.txt /root/ diff --git a/.teamcity/build.sh b/.teamcity/build.sh index 9b8b7a3..298812e 100755 --- a/.teamcity/build.sh +++ b/.teamcity/build.sh @@ -67,6 +67,7 @@ function run_test_with_gpu() { ======================================== EOF ctest --output-on-failure + rm -rf ${REPO_ROOT}/build } function run_test_with_cpu() { @@ -81,19 +82,41 @@ function run_test_with_cpu() { ======================================== EOF ctest --output-on-failure + rm -rf ${REPO_ROOT}/build +} + +function run_import_test { + export CUDA_VISIBLE_DEVICES="" + + mkdir -p ${REPO_ROOT}/build + cd ${REPO_ROOT}/build + + cmake .. -DIS_TESTING_IMPORT=ON + + cat <