1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#!/usr/bin/sh
# packages needed:
#
# mono-runtime: /usr/bin/mono
# mono-runtime: /usr/bin/gacutil
# mono-runtime: /usr/share/mono/MonoGetAssemblyName.exe
# mono-runtime: /usr/lib/mono/4.5/gacutil.exe
# mono-devel: /usr/bin/pedump
# mono-devel: /usr/bin/peverify
# mono-devel: /usr/bin/monodis
set -e -v -o pipefail
# check runtime tools are found and functioning
mono --version
# sgen by default
mono --version | grep "GC:.*sgen"
# check running gacutil and assemblies are recognised
GAC_TOTAL=$(gacutil -l | grep "Number of items" | sed 's/.* = //')
echo Global assemblies: $GAC_TOTAL
test $GAC_TOTAL -gt 5
# check running through mono (gacutil.exe is just a random .exe)
mono /usr/lib/mono/4.5/gacutil.exe -l | grep "Number of items"
mono /usr/share/mono/MonoGetAssemblyName.exe \
/usr/lib/mono/4.5/gacutil.exe | grep gacutil
# check pe tools
peverify /usr/lib/mono/4.5/gacutil.exe && echo "peverify OK"
pedump /usr/lib/mono/4.5/gacutil.exe > /dev/null && echo "pedump OK"
monodis /usr/lib/mono/4.5/gacutil.exe | grep "\.assembly 'gacutil'"
# no bin-fmt support in unshare chroot, skip this test for now
# # check bin-fmts recognises exes
# /usr/lib/mono/4.5/gacutil.exe -l | grep "Number of items"
|