• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3
4# This program launches "abidiff $binary $binary" on multiple
5# instances of $binary.  The expect result is for the command to show
6# an empty result.  Otherwise, this program exits with an error and
7# outputs some text about the binary on which abidiff failed.
8
9abidiff=@top_builddir@/tools/abidiff
10objdir=@top_builddir@/src/.libs
11objext=@OBJEXT@
12
13binaries="abg-tools-utils abg-hash abg-ini abg-writer"
14outputfile=runtestcanonicalizetypes.output.txt
15finaloutputfile=runtestcanonicalizetypes.output.final.txt
16cat /dev/null > $outputfile
17
18for i in $binaries;
19do
20  obj=$objdir/$i.$objext
21  cmd="$abidiff --no-default-suppression $obj $obj"
22  `$cmd` > $outputfile
23  if test -s $outputfile; then
24      echo $cmd >> $finaloutputfile
25      cat $outputfile >> $finaloutputfile
26  fi
27done
28
29if test -s $finaloutputfile; then
30 cat $finaloutputfile
31 exit 1
32fi
33