[darwinbuild-changes] [670] branches/PR-7482850/testing/darwinup
source_changes at macosforge.org
source_changes at macosforge.org
Thu Dec 17 17:29:27 PST 2009
Revision: 670
http://trac.macosforge.org/projects/darwinbuild/changeset/670
Author: wsiegrist at apple.com
Date: 2009-12-17 17:29:26 -0800 (Thu, 17 Dec 2009)
Log Message:
-----------
Use set -e and -x in run-tests. Add test cases for 7482850.
Modified Paths:
--------------
branches/PR-7482850/testing/darwinup/run-tests.sh
Added Paths:
-----------
branches/PR-7482850/testing/darwinup/root5.tar.gz
branches/PR-7482850/testing/darwinup/root6.tar.gz
branches/PR-7482850/testing/darwinup/root7.tar.gz
Added: branches/PR-7482850/testing/darwinup/root5.tar.gz
===================================================================
(Binary files differ)
Property changes on: branches/PR-7482850/testing/darwinup/root5.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/PR-7482850/testing/darwinup/root6.tar.gz
===================================================================
(Binary files differ)
Property changes on: branches/PR-7482850/testing/darwinup/root6.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: branches/PR-7482850/testing/darwinup/root7.tar.gz
===================================================================
(Binary files differ)
Property changes on: branches/PR-7482850/testing/darwinup/root7.tar.gz
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/PR-7482850/testing/darwinup/run-tests.sh
===================================================================
--- branches/PR-7482850/testing/darwinup/run-tests.sh 2009-12-18 00:15:54 UTC (rev 669)
+++ branches/PR-7482850/testing/darwinup/run-tests.sh 2009-12-18 01:29:26 UTC (rev 670)
@@ -1,4 +1,6 @@
#!/bin/bash
+set -e
+set -x
#
# Run tests on darwinup
@@ -9,6 +11,8 @@
DEST=$PREFIX/dest
DESTTAR=dest.tar.gz
+DIFF="diff -x .DarwinDepot -qru"
+
ROOTS="root root2 root3"
echo "INFO: Cleaning up testing area ..."
@@ -22,8 +26,12 @@
do
tar zxvf $R.tar.gz -C $PREFIX
done;
-tar zxvf root4.tar.gz -C $PREFIX
+for R in root4 root5 root6 root7;
+do
+ tar zxvf $R.tar.gz -C $PREFIX
+done;
+
mkdir -p $ORIG
cp -R $DEST/* $ORIG/
@@ -32,13 +40,11 @@
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
+ $DIFF $ORIG $DEST 2>&1
done
echo "TEST: Trying all roots at once, uninstall in reverse ...";
@@ -46,74 +52,79 @@
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
+$DIFF $ORIG $DEST 2>&1
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
+$DIFF $ORIG $DEST 2>&1
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
+$DIFF $ORIG $DEST 2>&1
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
+$DIFF $ORIG $DEST 2>&1
+echo "TEST: Try uninstalling with user data in rollback"
+echo "INFO: Installing root5 ...";
+darwinup -vv -p $DEST install $PREFIX/root5
+darwinup -vv -p $DEST install $PREFIX/root6
+echo "modification" >> $DEST/d/file
+darwinup -vv -p $DEST install $PREFIX/root7
+darwinup -vv -p $DEST uninstall root6
+darwinup -vv -p $DEST uninstall root5
+darwinup -vv -p $DEST uninstall root7
+
+
+set +e
+
echo "TEST: Trying a root that will fail due to object change ..."
darwinup -vv -p $DEST install $PREFIX/root4
if [ $? -ne 1 ]; 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
+$DIFF $ORIG $DEST 2>&1
echo "INFO: Done testing!"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20091217/c2b0d576/attachment-0001.html>
More information about the darwinbuild-changes
mailing list