Skip to contentSkip to conversation

generic/007: cleanup $TEST_DIR/$seq dir

PATCH New Amir Goldstein 1 participant 1 message Feb 3, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 generic/007: cleanup $TEST_DIR/$seq dir

Test generic/007 was failing after running test overlay/007, because the latter left behind a non empty directory named 007 in test dir and the former failed to mkdir a directory with the same name.

Cleanup $TEST_DIR/$seq both at end of overlay/007 and beginning of generic/007 to avoid this collision.

---
 tests/generic/007 | 1 +
 tests/overlay/007 | 1 +
 2 files changed, 2 insertions(+)

v2:
- Cleanup just $TEST_DIR/007

v1:
- Cleanup $TEST_DIR/$seq* files after tests

tests/generic/007 +1 -0
index 88cd6cc..cfa4554 100755
@@ -64,6 +64,7 @@ while [ $i -le $num_filenames ]; do
   let i=$i+1
 done
 
+rm -rf $TEST_DIR/$seq
 mkdir $TEST_DIR/$seq
 cd $TEST_DIR/$seq
 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z
tests/overlay/007 +1 -0
index ccf2b75..ed7914b 100755
@@ -37,6 +37,7 @@ _cleanup()
 {
 	cd /
 	rm -f $tmp.*
+	rm -rf $TEST_DIR/$seq
 }
 
 # get standard environment, filters and checks
Signature · 1 line
2.7.4