blob: 526eb091ca8c889d53e9e80729faebac313f8ffe [file] [log] [blame]
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00001#! /bin/sh
2# Copyright (C) 1999, 2000, 2002, 2003, 2005 Red Hat, Inc.
3# Written by Ulrich Drepper <drepper@redhat.com>, 1999.
4#
5# This program is Open Source software; you can redistribute it and/or
6# modify it under the terms of the Open Software License version 1.0 as
7# published by the Open Source Initiative.
8#
9# You should have received a copy of the Open Software License along
10# with this program; if not, you may obtain a copy of the Open Software
11# License version 1.0 from http://www.opensource.org/licenses/osl.php or
12# by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
13# 3001 King Ranch Road, Ukiah, CA 95482.
14set -e
15
16original=${original:-testfile11}
17stripped=${stripped:-testfile7}
18debugout=${debugfile:+-f testfile.debug.temp -F $debugfile}
19
20# Don't fail if we cannot decompress the file.
21bunzip2 -c $srcdir/$original.bz2 > $original 2>/dev/null || exit 0
22
23# Don't fail if we cannot decompress the file.
24bunzip2 -c $srcdir/$stripped.bz2 > $stripped 2>/dev/null || exit 0
25
26# Don't fail if we cannot decompress the file.
27test -z "$debugfile" ||
28bunzip2 -c $srcdir/$debugfile.bz2 > $debugfile 2>/dev/null || exit 0
29
30LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
31 ../src/strip -o testfile.temp $debugout $original
32
33cmp $stripped testfile.temp
34
35# Check elflint and the expected result.
36LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
37 ../src/elflint -q testfile.temp
38
39test -z "$debugfile" || {
40cmp $debugfile testfile.debug.temp
41
42# Check elflint and the expected result.
43LD_LIBRARY_PATH=../libebl:../libelf${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH \
44 ../src/elflint -q -d testfile.debug.temp
45
46rm -f "$debugfile"
47}
48
49rm -f $original $stripped testfile.temp testfile.debug.temp
50
51exit 0