diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-03-09 12:49:42 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-03-16 15:25:07 +0900 |
commit | 2b86b42c7fd09f31d8084cf054ed59c229159ca4 (patch) | |
tree | d2b193b9cadc5e7c9efe1f74ceb48d3753393682 | |
parent | 5d3fba42937ce09253a3e3adf54b18973d231cf0 (diff) |
scenario_test: "--force" option to remove directories
To avoid the intractive prompt before removals, this patch adds
"--force" option to remove directories.
Also, fixes "--recursive" to "--force" option when removing xml
files (not directories).
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
-rw-r--r-- | test/lib/base.py | 2 | ||||
-rw-r--r-- | test/scenario_test/ci-scripts/jenkins-build-script.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/base.py b/test/lib/base.py index 8e2c5f22..cbbb764f 100644 --- a/test/lib/base.py +++ b/test/lib/base.py @@ -272,7 +272,7 @@ class BGPContainer(Container): def __init__(self, name, asn, router_id, ctn_image_name): self.config_dir = '/'.join((TEST_BASE_DIR, TEST_PREFIX, name)) - local('if [ -e {0} ]; then rm -r {0}; fi'.format(self.config_dir)) + local('if [ -e {0} ]; then rm -rf {0}; fi'.format(self.config_dir)) local('mkdir -p {0}'.format(self.config_dir)) local('chmod 777 {0}'.format(self.config_dir)) self.asn = asn diff --git a/test/scenario_test/ci-scripts/jenkins-build-script.sh b/test/scenario_test/ci-scripts/jenkins-build-script.sh index c1f536aa..6baf2193 100644 --- a/test/scenario_test/ci-scripts/jenkins-build-script.sh +++ b/test/scenario_test/ci-scripts/jenkins-build-script.sh @@ -16,7 +16,7 @@ if [ "${BUILD_TAG}" != "" ]; then sudo sh -c ": > /var/log/upstart/docker.log" fi -rm -r ${WS}/nosetest*.xml +rm -f ${WS}/nosetest*.xml cp -r ../workspace $GOBGP pwd cd $GOBGP |