Skip to contentSkip to conversation

dtc: Don't delete *.test.dtb between testgroups

PATCH Applied David Gibson 2 participants 2 messages Oct 16, 2007

lore
Share & tools
lore
#0 lore raw

The dtc/libfdt testsuite creates a number of .dtb files during its run. To ensure a clean test run, these are currently deleted before each group of tests.

This is, in fact, a mistake, since if something goes wrong in the first group of tests, deleting the .dtb at the beginning of the second group of tests makes it harder to figure out what the problem was.

This patch changes the script to only delete the files once, before the whole test run.

tests/run_tests.sh +3 -6
Index: dtc/tests/run_tests.sh
===================================================================
@@ -60,9 +60,6 @@ tree1_tests_rw () {
 }
 
 libfdt_tests () {
-    # Make sure we don't have stale blobs lying around
-    rm -f *.test.dtb
-
     tree1_tests test_tree1.dtb
 
     # Sequential write tests
@@ -102,9 +99,6 @@ libfdt_tests () {
 }
 
 dtc_tests () {
-    # Make sure we don't have stale blobs lying around
-    rm -f *.test.dtb
-
     run_test dtc.sh -f -I dts -O dtb -o dtc_tree1.test.dtb test_tree1.dts
     tree1_tests dtc_tree1.test.dtb
     tree1_tests_rw dtc_tree1.test.dtb
@@ -125,6 +119,9 @@ if [ -z "$TESTSETS" ]; then
     TESTSETS="libfdt dtc"
 fi
 
+# Make sure we don't have stale blobs lying around
+rm -f *.test.dtb
+
 for set in $TESTSETS; do
     case $set in
 	"libfdt")
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Applied
#1 lore raw

So, like, the other day David Gibson mumbled:

Quoted 4 lines

The dtc/libfdt testsuite creates a number of .dtb files during its run. To ensure a clean test run, these are currently deleted before each group of tests.

Quoted 8 lines

This is, in fact, a mistake, since if something goes wrong in the first group of tests, deleting the .dtb at the beginning of the second group of tests makes it harder to figure out what the problem was.

This patch changes the script to only delete the files once, before the whole test run.

Applied.

jdl