show helpful cramfs state in a different color
authorErez_Zadok <ezk@cs.sunysb.edu>
Thu, 12 Jul 2007 02:20:10 +0000 (22:20 -0400)
committerErez_Zadok <ezk@cs.sunysb.edu>
Thu, 12 Jul 2007 02:20:10 +0000 (22:20 -0400)
This helps distinguish these messages from the state of the test messages.

run-tests
scaffold

index 8b38544f6691728fd83f7397732a7a75a4dbec61..d9f7f1863ecadc9b3eb78a53e968a96fdc615e7f 100755 (executable)
--- a/run-tests
+++ b/run-tests
@@ -219,7 +219,7 @@ do
 
   # Export the type of file systems, as some tests need to know.
   # For example: jffs2, cramfs, and squashfs.
-  export FS0 FS1 FS2 FS3 DEV0 DEV1 DEV2 DEV3 SPECIAL_FS delay
+  export FS0 FS1 FS2 FS3 DEV0 DEV1 DEV2 DEV3 SPECIAL_FS delay OUTPUT_COLOR
 
   # run actual test and abort on error (test script tries to umount unionfs)
   runcmd bash $t
index 423728227393243b8ca21ecb0facfb19e2bda563..dd0f2caab7b2cf7dbef06618fca32664fc79438d 100644 (file)
--- a/scaffold
+++ b/scaffold
@@ -146,7 +146,9 @@ function cramit {
                dir=`echo $n | sed 's/=ro//g'`
                i=`echo $n | tr -dc '[0-9]'`
                dev=$(eval echo \$DEV$i)
-               echo -n "${fs}@${dev} "
+               # show internal state in yellow
+               echo -e -n "\033[1;33m${fs}@/n/lower/b$i\033[m "
+               test -n "$OUTPUT_COLOR" && echo -e -n "\033[${OUTPUT_COLOR}m"
                tmpimg=/tmp/$fs.img.$i
                runcmd mkfs -t $fs /n/lower/b$i $tmpimg
                runcmd mount -t $fs -o loop $tmpimg /n/lower/b$i