[darwinbuild-changes] [496] branches/PR-6722857/testing/darwinup
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 25 17:29:35 PDT 2009
Revision: 496
http://trac.macosforge.org/projects/darwinbuild/changeset/496
Author: wsiegrist at apple.com
Date: 2009-03-25 17:29:32 -0700 (Wed, 25 Mar 2009)
Log Message:
-----------
More test coverage
Modified Paths:
--------------
branches/PR-6722857/testing/darwinup/root.tar.gz
branches/PR-6722857/testing/darwinup/run-tests.sh
Added Paths:
-----------
branches/PR-6722857/testing/darwinup/root2.tar.gz
branches/PR-6722857/testing/darwinup/root3.tar.gz
Modified: branches/PR-6722857/testing/darwinup/root.tar.gz
===================================================================
(Binary files differ)
Added: branches/PR-6722857/testing/darwinup/root2.tar.gz
===================================================================
(Binary files differ)
Property changes on: branches/PR-6722857/testing/darwinup/root2.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/PR-6722857/testing/darwinup/root3.tar.gz
===================================================================
(Binary files differ)
Property changes on: branches/PR-6722857/testing/darwinup/root3.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/PR-6722857/testing/darwinup/run-tests.sh
===================================================================
--- branches/PR-6722857/testing/darwinup/run-tests.sh 2009-03-25 20:53:30 UTC (rev 495)
+++ branches/PR-6722857/testing/darwinup/run-tests.sh 2009-03-26 00:29:32 UTC (rev 496)
@@ -7,36 +7,107 @@
PREFIX=/tmp/testing/darwinup
ORIG=$PREFIX/orig
DEST=$PREFIX/dest
-ROOT=$PREFIX/root
DESTTAR=dest.tar.gz
-ROOTTAR=root.tar.gz
+ROOTS="root root2 root3"
+
echo "INFO: Cleaning up testing area ..."
rm -rf $PREFIX
mkdir -p $PREFIX
echo "INFO: Untarring the test files ..."
tar zxvf $DESTTAR -C $PREFIX
-tar zxvf $ROOTTAR -C $PREFIX
+for R in $ROOTS;
+do
+ tar zxvf $R.tar.gz -C $PREFIX
+done;
+
mkdir -p $ORIG
cp -R $DEST/* $ORIG/
-echo "INFO: Installing test root ..."
-darwinup -p $DEST install $ROOT
+echo "TEST: Trying roots one at a time ..."
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+ UUID=$(darwinup -p $DEST list | head -3 | tail -1 | awk '{print $1}')
+ echo "INFO: Uninstalling $R ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+ echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+ diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+done
-echo "DIFF: diffing root and dest files (should be no diffs) ..."
-diff -qru $ROOT $DEST 2>&1 | grep -v \\.DarwinDepot
+echo "TEST: Trying all roots at once, uninstall in reverse ...";
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in $ROOTS;
+do
+ UUID=$(darwinup -p $DEST list | head -3 | tail -1 | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
-echo "INFO: Determining the UUID ..."
-UUID=$(darwinup -p $DEST list | tail -1 | awk '{print $1}')
-echo "UUID=$UUID"
+echo "TEST: Trying all roots at once, uninstall in install order ..."
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in $ROOTS;
+do
+ UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
-echo "INFO: Uninstalling test root ..."
-darwinup -p $DEST uninstall $UUID
+echo "TEST: Trying all roots at once, uninstall root2, root3, root ..."
+for R in $ROOTS;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in root2 root3 root;
+do
+ UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+echo "DIFF: diffing original test files to dest (should be no diffs) ..."
+diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+echo "TEST: Trying roots in reverse, uninstall in install order ..."
+for R in root3 root2 root;
+do
+ echo "INFO: Installing $R ...";
+ darwinup -vv -p $DEST install $PREFIX/$R
+ if [ $? -gt 0 ]; then exit 1; fi
+done
+for R in root3 root2 root;
+do
+ UUID=$(darwinup -p $DEST list | grep $R$ | awk '{print $1}')
+ echo "INFO: Uninstalling $UUID ...";
+ darwinup -vv -p $DEST uninstall $UUID
+ if [ $? -gt 0 ]; then exit 1; fi
+done
echo "DIFF: diffing original test files to dest (should be no diffs) ..."
diff -qru $ORIG $DEST 2>&1 | grep -v \\.DarwinDepot
+
echo "INFO: Done testing!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20090325/7b29d132/attachment-0001.html>
More information about the darwinbuild-changes
mailing list