2002-05-09 Elena Zannoni <ezannoni@redhat.com>
[deliverable/binutils-gdb.git] / binutils / sanity.sh
CommitLineData
252b5132
RH
1#!/bin/sh
2### quick sanity test for the binutils.
3###
4### This file was written and is maintained by K. Richard Pixley,
5### rich@cygnus.com.
6
7### fail on errors
8set -e
9
10### first arg is directory in which binaries to be tested reside.
11case "$1" in
12"") BIN=. ;;
13*) BIN="$1" ;;
14esac
15
16### size
17for i in size objdump nm ar strip ranlib ; do
18 ${BIN}/size ${BIN}/$i > /dev/null
19done
20
21### objdump
22for i in size objdump nm ar strip ranlib ; do
23 ${BIN}/objdump -ahifdrtxsl ${BIN}/$i > /dev/null
24done
25
26### nm
27for i in size objdump nm ar strip ranlib ; do
28 ${BIN}/nm ${BIN}/$i > /dev/null
29done
30
31### strip
32TMPDIR=./binutils-$$
33mkdir ${TMPDIR}
34
35cp ${BIN}/strip ${TMPDIR}/strip
36
37for i in size objdump nm ar ranlib ; do
38 cp ${BIN}/$i ${TMPDIR}/$i
39 ${BIN}/strip ${TMPDIR}/$i
40 cp ${BIN}/$i ${TMPDIR}/$i
41 ${TMPDIR}/strip ${TMPDIR}/$i
42done
43
44### ar
45
46### ranlib
47
48rm -rf ${TMPDIR}
49
50exit 0
This page took 0.105993 seconds and 4 git commands to generate.