| 1 |
#require test-repo slow osx osxpackaging |
| 2 |
|
| 3 |
$ . "$TESTDIR/helpers-testrepo.sh" |
| 4 |
$ testrepohgenv |
| 5 |
|
| 6 |
$ OUTPUTDIR="`pwd`" |
| 7 |
$ export OUTPUTDIR |
| 8 |
$ KEEPMPKG=yes |
| 9 |
$ export KEEPMPKG |
| 10 |
|
| 11 |
$ cd "$TESTDIR"/.. |
| 12 |
$ contrib/genosxversion.py --selftest ignoredarg |
| 13 |
$ make osx > "$OUTPUTDIR/build.log" 2>&1 |
| 14 |
$ cd "$OUTPUTDIR" |
| 15 |
$ ls -d *.pkg |
| 16 |
Mercurial-*-macosx10.*.pkg (glob) |
| 17 |
|
| 18 |
$ xar -xf Mercurial*.pkg |
| 19 |
|
| 20 |
Gather list of all installed files: |
| 21 |
$ lsbom mercurial.pkg/Bom > boms.txt |
| 22 |
|
| 23 |
We've had problems with the filter logic in the past. Make sure no |
| 24 |
.DS_Store files ended up in the final package: |
| 25 |
$ grep DS_S boms.txt |
| 26 |
[1] |
| 27 |
|
| 28 |
Spot-check some randomly selected files: |
| 29 |
$ grep bdiff boms.txt | cut -d ' ' -f 1,2,3 |
| 30 |
./Library/Python/2.7/site-packages/mercurial/cext/bdiff.so 100755 0/0 |
| 31 |
./Library/Python/2.7/site-packages/mercurial/cffi/bdiff.py 100644 0/0 |
| 32 |
./Library/Python/2.7/site-packages/mercurial/cffi/bdiff.pyc 100644 0/0 |
| 33 |
./Library/Python/2.7/site-packages/mercurial/cffi/bdiff.pyo 100644 0/0 |
| 34 |
./Library/Python/2.7/site-packages/mercurial/cffi/bdiffbuild.py 100644 0/0 |
| 35 |
./Library/Python/2.7/site-packages/mercurial/cffi/bdiffbuild.pyc 100644 0/0 |
| 36 |
./Library/Python/2.7/site-packages/mercurial/cffi/bdiffbuild.pyo 100644 0/0 |
| 37 |
./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0 |
| 38 |
./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0 |
| 39 |
./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0 |
| 40 |
$ grep zsh/site-functions/_hg boms.txt | cut -d ' ' -f 1,2,3 |
| 41 |
./usr/local/share/zsh/site-functions/_hg 100644 0/0 |
| 42 |
$ grep bash-completion/completions/hg boms.txt | cut -d ' ' -f 1,2,3 |
| 43 |
./usr/local/share/bash-completion-completions/hg 100644 0/0 |
| 44 |
$ grep -E 'man[15]' boms.txt | cut -d ' ' -f 1,2,3 |
| 45 |
./usr/local/share/man/man1 40755 0/0 |
| 46 |
./usr/local/share/man/man1/chg.1 100644 0/0 |
| 47 |
./usr/local/share/man/man1/hg.1 100644 0/0 |
| 48 |
./usr/local/share/man/man5 40755 0/0 |
| 49 |
./usr/local/share/man/man5/hgignore.5 100644 0/0 |
| 50 |
./usr/local/share/man/man5/hgrc.5 100644 0/0 |
| 51 |
$ grep bser boms.txt | cut -d ' ' -f 1,2,3 |
| 52 |
./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0 |
| 53 |
./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0 |
| 54 |
./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0 |
| 55 |
./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0 |
| 56 |
$ grep localrepo boms.txt | cut -d ' ' -f 1,2,3 |
| 57 |
./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0 |
| 58 |
./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0 |
| 59 |
./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0 |
| 60 |
$ grep -E 'bin/' boms.txt | cut -d ' ' -f 1,2,3 |
| 61 |
./usr/local/bin/chg 100755 0/0 |
| 62 |
./usr/local/bin/hg 100755 0/0 |
| 63 |
|
| 64 |
Make sure the built binary uses the system Python interpreter |
| 65 |
$ bsdtar xf mercurial.pkg/Payload usr/local/bin |
| 66 |
Use a glob to find this to avoid check-code whining about a fixed path. |
| 67 |
$ head -n 1 usr/local/b?n/hg |
| 68 |
#!/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python |
| 69 |
|
| 70 |
Note that we're not currently installing any /etc/mercurial stuff, |
| 71 |
including merge-tool configurations. |