This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Commit: Only run tests involving bfdtest if it is present

Hi Guys,

  I am checking in the patch below to fix a small problem with the
  binutils testsuite.  If the testsuite was run on an installed
  toolchain the tests involving the bfdtest1 and bfdtest2 executables
  would fail because these programs are not installed.  Since the
  programs only exist to be used by the testsuite it does not make sense
  to install them, so instead I have chosen to create a patch which
  skips the test when they are not present.


2014-06-03  Nick Clifton  <>

	* binutils-all/ar.exp: Skip tests involving bfdtest1 and bfdtest2
	if these executables are not present.

diff --git a/binutils/testsuite/binutils-all/ar.exp b/binutils/testsuite/binutils-all/ar.exp
index cbfb39e..21b7a69 100644
--- a/binutils/testsuite/binutils-all/ar.exp
+++ b/binutils/testsuite/binutils-all/ar.exp
@@ -557,16 +557,24 @@ proc move_an_element { } {
 # Run the tests.
-set bfdtests [list bfdtest1 bfdtest2]
+# Only run the bfdtest checks if the programs exist.  Since these
+# programs are built but not installed, running the testsuite on an
+# installed toolchain will produce ERRORs about missing bfdtest1 and
+# bfdtest2 executables.
+if { [file exists $base_dir/bfdtest1] && [file exists $base_dir/bfdtest2] } {
+    set bfdtests [list bfdtest1 bfdtest2]
+    long_filenames $bfdtests
+    thin_archive $bfdtests
+    thin_archive_with_nested $bfdtests
-long_filenames $bfdtests
-thin_archive $bfdtests
-thin_archive_with_nested $bfdtests
 if { [is_elf_format]
      && ![istarget "*-*-hpux*"]
      && ![istarget "msp*-*-*"] } {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]