Revision
870
Author
wsiegrist@apple.com
Date
2010-09-13 11:04:54 -0700 (Mon, 13 Sep 2010)

Log Message

Filter our "Found archive ..." messages so the rename tests pass in debug mode. Add test roots and steps for object type change errors.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: branches/PR-8416637/testing/darwinup/dest.tar.gz


(Binary files differ)

Added: branches/PR-8416637/testing/darwinup/rep_dir_file.tar.gz


(Binary files differ)
Property changes on: branches/PR-8416637/testing/darwinup/rep_dir_file.tar.gz ___________________________________________________________________

Added: svn:mime-type

Added: branches/PR-8416637/testing/darwinup/rep_dir_link.tar.gz


(Binary files differ)
Property changes on: branches/PR-8416637/testing/darwinup/rep_dir_link.tar.gz ___________________________________________________________________

Added: svn:mime-type

Added: branches/PR-8416637/testing/darwinup/rep_file_dir.tar.gz


(Binary files differ)
Property changes on: branches/PR-8416637/testing/darwinup/rep_file_dir.tar.gz ___________________________________________________________________

Added: svn:mime-type

Added: branches/PR-8416637/testing/darwinup/rep_file_link.tar.gz


(Binary files differ)
Property changes on: branches/PR-8416637/testing/darwinup/rep_file_link.tar.gz ___________________________________________________________________

Added: svn:mime-type

Added: branches/PR-8416637/testing/darwinup/rep_link_dir.tar.gz


(Binary files differ)
Property changes on: branches/PR-8416637/testing/darwinup/rep_link_dir.tar.gz ___________________________________________________________________

Added: svn:mime-type

Added: branches/PR-8416637/testing/darwinup/rep_link_file.tar.gz


(Binary files differ)
Property changes on: branches/PR-8416637/testing/darwinup/rep_link_file.tar.gz ___________________________________________________________________

Added: svn:mime-type

Deleted: branches/PR-8416637/testing/darwinup/root4.tar.gz


(Binary files differ)

Modified: branches/PR-8416637/testing/darwinup/run-tests.sh (869 => 870)


--- branches/PR-8416637/testing/darwinup/run-tests.sh	2010-09-13 15:19:50 UTC (rev 869)
+++ branches/PR-8416637/testing/darwinup/run-tests.sh	2010-09-13 18:04:54 UTC (rev 870)
@@ -32,11 +32,17 @@
 	tar zxvf $R.tar.gz -C $PREFIX
 done;
 
-for R in root4 root5 root6 root7 symlinks symlink_update;
+for R in root5 root6 root7 symlinks symlink_update;
 do
 	tar zxvf $R.tar.gz -C $PREFIX
 done;
 
+for R in rep_dir_file rep_dir_link rep_file_dir rep_file_link \
+		 rep_link_dir rep_link_file;
+do
+	tar zxvf $R.tar.gz -C $PREFIX
+done;
+
 for R in 300dirs.tbz2 300files.tbz2 deep-rollback.cpgz deep-rollback-2.xar extension.tar.bz2;
 do
 	cp $R $PREFIX/
@@ -277,24 +283,24 @@
 $DARWINUP install $PREFIX/root
 $DARWINUP install $PREFIX/root6
 $DARWINUP rename root "RENAME1"
-C=$($DARWINUP list | grep "RENAME1" | wc -l | xargs)
+C=$($DARWINUP list | grep "RENAME1" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "1" 
 $DARWINUP rename oldest "RENAME2"
-C=$($DARWINUP list | grep "RENAME2" | wc -l | xargs)
+C=$($DARWINUP list | grep "RENAME2" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "1" 
 $DARWINUP uninstall "RENAME1"
-C=$($DARWINUP list | grep "RENAME1" | wc -l | xargs)
+C=$($DARWINUP list | grep "RENAME1" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "0" 
-C=$($DARWINUP files "RENAME2" | wc -l | xargs)
+C=$($DARWINUP files "RENAME2" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "17" 
-C=$($DARWINUP verify "RENAME2" | wc -l | xargs)
+C=$($DARWINUP verify "RENAME2" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "17"
 $DARWINUP rename root6 RENAME3 RENAME3 RENAME4 RENAME4 RENAME5 RENAME5 RENAME6
-C=$($DARWINUP list | grep "root6" | wc -l | xargs)
+C=$($DARWINUP list | grep "root6" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "0" 
-C=$($DARWINUP list | grep "RENAME6" | wc -l | xargs)
+C=$($DARWINUP list | grep "RENAME6" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "1" 
-C=$($DARWINUP files "RENAME6" | wc -l | xargs)
+C=$($DARWINUP files "RENAME6" | grep -Ev '^Found' | wc -l | xargs)
 test "$C" == "8"
 $DARWINUP uninstall all
 echo "DIFF: diffing original test files to dest (should be no diffs) ..."
@@ -313,16 +319,58 @@
 $DIFF $ORIG $DEST 2>&1
 
 
+# XXX: need to test the force option overrides expected fail cases
+
+
 #
 # The following are expected failures
 #
+echo "========== Expected Failures =========="
 set +e
-echo "========== TEST: Trying a root that will fail due to object change =========="
-$DARWINUP install $PREFIX/root4
+
+echo "========== TEST: Try replacing File with Directory =========="
+$DARWINUP install $PREFIX/rep_file_dir
 if [ $? -ne 1 ]; then exit 1; fi
 echo "DIFF: diffing original test files to dest (should be no diffs) ..."
 $DIFF $ORIG $DEST 2>&1
+if [ $? -ne 0 ]; then exit 1; fi
 
+echo "========== TEST: Try replacing File with Symlink =========="
+$DARWINUP install $PREFIX/rep_file_link
+if [ $? -ne 1 ]; then exit 1; fi
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+$DIFF $ORIG $DEST 2>&1
+if [ $? -ne 0 ]; then exit 1; fi
+
+echo "========== TEST: Try replacing Directory with Symlink =========="
+$DARWINUP install $PREFIX/rep_dir_link
+if [ $? -ne 1 ]; then exit 1; fi
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+$DIFF $ORIG $DEST 2>&1
+if [ $? -ne 0 ]; then exit 1; fi
+
+echo "========== TEST: Try replacing Directory with File =========="
+$DARWINUP install $PREFIX/rep_dir_file
+if [ $? -ne 1 ]; then exit 1; fi
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+$DIFF $ORIG $DEST 2>&1
+if [ $? -ne 0 ]; then exit 1; fi
+
+echo "========== TEST: Try replacing Symlink with Directory =========="
+$DARWINUP install $PREFIX/rep_link_dir
+if [ $? -ne 1 ]; then exit 1; fi
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+$DIFF $ORIG $DEST 2>&1
+if [ $? -ne 0 ]; then exit 1; fi
+
+echo "========== TEST: Try replacing Symlink with File =========="
+$DARWINUP install $PREFIX/rep_link_file
+if [ $? -ne 1 ]; then exit 1; fi
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+$DIFF $ORIG $DEST 2>&1
+if [ $? -ne 0 ]; then exit 1; fi
+
+
 popd >> /dev/null
 echo "INFO: Done testing!"