summaryrefslogtreecommitdiffhomepage
path: root/test/lib/base.py
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-03-09 12:49:42 +0900
committerIWASE Yusuke <iwase.yusuke0@gmail.com>2017-03-16 15:25:07 +0900
commit2b86b42c7fd09f31d8084cf054ed59c229159ca4 (patch)
treed2b193b9cadc5e7c9efe1f74ceb48d3753393682 /test/lib/base.py
parent5d3fba42937ce09253a3e3adf54b18973d231cf0 (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>
Diffstat (limited to 'test/lib/base.py')
-rw-r--r--test/lib/base.py2
1 files changed, 1 insertions, 1 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