Skip to content

Commit ba68704

Browse files
committed
Fix api test, fix testing script for macos
1 parent b102d29 commit ba68704

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

paddle/api/test/run_tests.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ popd > /dev/null
2020

2121
cd $SCRIPTPATH
2222

23-
if [ ! -f ../../dist/*.whl ] ; then # Swig not compiled.
24-
exit 0
25-
fi
26-
27-
rm .test_env -rf
23+
rm -rf .test_env
2824
virtualenv .test_env
2925
source .test_env/bin/activate
3026

paddle/trainer/Tester.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ Tester::Tester(const std::shared_ptr<TrainerConfigHelper>& config,
6666
}
6767

6868
void Tester::startTestPeriod() {
69-
testDataProvider_->reset();
69+
if (testDataProvider_) {
70+
testDataProvider_->reset();
71+
}
7072
testEvaluator_->start();
7173
testContext_.cost = 0;
7274
testContext_.numSamples = 0;

0 commit comments

Comments
 (0)