Patchwork [4,of,5,stable,osx-packaging,v2] tests: add test for Mac OS X package construction

login
register
mail settings
Submitter Augie Fackler
Date April 27, 2016, 3:45 p.m.
Message ID <4834b2dccefc7d1948d9.1461771954@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/14801/
State Superseded
Commit f2549b0ba9ab60724bac6edf22c2b91a3db94f2f
Headers show

Comments

Augie Fackler - April 27, 2016, 3:45 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1461038395 14400
#      Mon Apr 18 23:59:55 2016 -0400
# Branch stable
# Node ID 4834b2dccefc7d1948d9e08035c89e7e30b893d8
# Parent  c027697e877fa6ea43a46356beb0075753cda98b
tests: add test for Mac OS X package construction

Patch

diff --git a/tests/test-mac-packages.t b/tests/test-mac-packages.t
new file mode 100644
--- /dev/null
+++ b/tests/test-mac-packages.t
@@ -0,0 +1,42 @@ 
+#require test-repo slow osx bdistmpkg
+  $ OUTPUTDIR=`pwd`
+  $ export OUTPUTDIR
+  $ KEEPMPKG=yes
+  $ export KEEPMPKG
+
+  $ cd "$TESTDIR"/..
+  $ make osx > $OUTPUTDIR/build.log 2>&1
+  $ cd $OUTPUTDIR
+  $ ls -d *.dmg *.mpkg
+  mercurial-*-macosx10.*.dmg (glob)
+  mercurial-*-macosx10.*.mpkg (glob)
+
+Gather list of all installed files:
+  $ find *.mpkg -name Archive.bom | xargs lsbom > boms.txt
+
+TODO: update to -f 1,2,3 when we're confident the installed owner of
+our files is corect. Right now it looks like it's the id of the user
+that builds the mpkg, which is probably slightly wrong.
+
+Spot-check some randomly selected files:
+  $ grep bdiff boms.txt | cut -d '	' -f 1,2
+  ./mercurial/bdiff.so	100775
+  ./mercurial/pure/bdiff.py	100664
+  ./mercurial/pure/bdiff.pyc	100664
+  ./mercurial/pure/bdiff.pyo	100664
+TODO: man pages don't get installed
+  $ egrep 'man[15]' boms.txt | cut -d '	' -f 1,2
+  $ grep bser boms.txt | cut -d '	' -f 1,2
+  ./hgext/fsmonitor/pywatchman/bser.so	100775
+  ./hgext/fsmonitor/pywatchman/pybser.py	100664
+  ./hgext/fsmonitor/pywatchman/pybser.pyc	100664
+  ./hgext/fsmonitor/pywatchman/pybser.pyo	100664
+  $ grep localrepo boms.txt | cut -d '	' -f 1,2
+  ./mercurial/localrepo.py	100664
+  ./mercurial/localrepo.pyc	100664
+  ./mercurial/localrepo.pyo	100664
+  $ grep '/hg	' boms.txt | cut -d '	' -f 1,2
+  ./hg	100775
+
+Note that we're not currently installing any /etc/mercurial stuff,
+including merge-tool configurations.