Blame tests/run-nm-self.sh

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