From 52f38877e48121e2fd82319b2c86f4f22d9a299e Mon Sep 17 00:00:00 2001 From: juncaipeng <52520497+juncaipeng@users.noreply.github.com> Date: Wed, 11 Dec 2019 15:03:10 +0800 Subject: [PATCH] Fix ci bug for deleting data files when other test is running (#21661) * fix ci bug for deleting data files, test=develop * update, test=develop --- .../tests/test_post_training_quantization_mobilenetv1.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py b/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py index 2e0d5ba9a03..5180723da46 100644 --- a/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py +++ b/python/paddle/fluid/contrib/slim/tests/test_post_training_quantization_mobilenetv1.py @@ -133,9 +133,10 @@ class TestPostTrainingQuantization(unittest.TestCase): "small_data", False) # reader/decorator.py requires the relative path to the data folder - cmd = 'rm -rf {0} && ln -s {1} {0}'.format("data", - self.data_cache_folder) - os.system(cmd) + if not os.path.exists("./data/ILSVRC2012"): + cmd = 'rm -rf {0} && ln -s {1} {0}'.format("data", + self.data_cache_folder) + os.system(cmd) self.batch_size = 1 if os.environ.get('DATASET') == 'full' else 50 self.sample_iterations = 50 if os.environ.get( -- GitLab