File: test-runtime

package info (click to toggle)
mono 6.14.1%2Bds2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,282,740 kB
  • sloc: cs: 11,182,461; xml: 2,850,281; ansic: 699,123; cpp: 122,919; perl: 58,604; javascript: 30,841; asm: 21,845; makefile: 19,602; sh: 10,973; python: 4,772; pascal: 925; sql: 859; sed: 16; php: 1
file content (36 lines) | stat: -rwxr-xr-x 1,211 bytes parent folder | download
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"