File: run_tests

package info (click to toggle)
abicheck 1.2-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 404 kB
  • sloc: perl: 2,667; ansic: 45; makefile: 32; sh: 28
file content (48 lines) | stat: -rw-r--r-- 943 bytes parent folder | download | duplicates (8)
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
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
# Copyright (c) 2001 by Sun Microsystems, Inc.
# All rights reserved.

PATH="`pwd`/..:$PATH"; export PATH

errs=0

pass() {
	echo "$0: passed: $name" 1>&2
}

fail() {
	echo "$0: failed: $name" 1>&2
	errs=`expr $errs + 1`
}

############################################################################
# libc_a:

name="libc.a static link test on libc_a"
if abicheck ./libc_a 2>/dev/null | grep 'STATIC_LINK:.*libc' > /dev/null; then
	pass
else
	fail
fi

############################################################################
# public1:

name="public1: only calls public syms"
if [ "`abicheck ./public1 2>/dev/null`" = "./public1: OK" ]; then
	pass
else
	fail
fi

############################################################################
# private1:

name="private1: calls private sym in libc"
if abicheck ./private1 2>/dev/null | egrep 'PRIVATE:.*libc.*(__open|__nanosleep)' > /dev/null; then
	pass
else
	fail
fi

exit $errs