Blame tests/run-nm-self.sh

Packit 032894
#! /bin/sh
Packit 032894
# Copyright (C) 2012, 2014 Red Hat, Inc.
Packit 032894
# This file is part of elfutils.
Packit 032894
#
Packit 032894
# This file is free software; you can redistribute it and/or modify
Packit 032894
# it under the terms of the GNU General Public License as published by
Packit 032894
# the Free Software Foundation; either version 3 of the License, or
Packit 032894
# (at your option) any later version.
Packit 032894
#
Packit 032894
# elfutils is distributed in the hope that it will be useful, but
Packit 032894
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 032894
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 032894
# GNU General Public License for more details.
Packit 032894
#
Packit 032894
# You should have received a copy of the GNU General Public License
Packit 032894
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 032894
Packit 032894
. $srcdir/test-subr.sh
Packit 032894
Packit 032894
# Test different command line combinations on the nm binary itself.
Packit 032894
# Test on nm ET_REL, ET_EXEC and ET_DYN files.
Packit 032894
ET_REL=${abs_top_builddir}/src/nm.o
Packit 032894
ET_EXEC=${abs_top_builddir}/src/nm
Packit 032894
ET_DYN=${abs_top_builddir}/libelf/libelf.so
Packit 032894
for what_arg in --debug-syms --defined-only --dynamic --extern-only; do
Packit 032894
  for format_arg in --format=bsd --format=sysv --format=posix; do
Packit 032894
    for out_arg in --numeric-sort --no-sort --reverse-sort; do
Packit 032894
      for self_file in $ET_REL $ET_EXEC $ET_DYN; do
Packit 032894
	# --dynamic doesn't make sense for ET_REL.
Packit 032894
	if ! test "$what_arg" = "--dynamic" -a "$self_file" = "$ET_REL"; then
Packit 032894
	  testrun ${abs_top_builddir}/src/nm $what_arg $format_arg $out_arg $self_file > /dev/null
Packit 032894
	fi
Packit 032894
      done
Packit 032894
    done
Packit 032894
  done
Packit 032894
done