public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gprofng/testsuite: skip Java test without JDK
@ 2022-12-19  8:36 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2022-12-19  8:36 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b1fb503404584f0e1965e06fce558b8841cb3a4d

commit b1fb503404584f0e1965e06fce558b8841cb3a4d
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Dec 19 09:36:21 2022 +0100

    gprofng/testsuite: skip Java test without JDK
    
    There's no point in even trying the Java test when gprofng was built
    without Java support, and when the building of the constituents of the
    testcase also would fail. On such systems this converts the respective
    tests from "unresolved" to "unsupported", making the overall testsuite
    run no longer report failure just because of this.

Diff:
---
 gprofng/Makefile.am                           | 1 +
 gprofng/Makefile.in                           | 1 +
 gprofng/testsuite/gprofng.display/display.exp | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gprofng/Makefile.am b/gprofng/Makefile.am
index 96f80157008..b90d569c093 100644
--- a/gprofng/Makefile.am
+++ b/gprofng/Makefile.am
@@ -61,6 +61,7 @@ check-DEJAGNU: site.exp development.exp
 	runtest=$(RUNTEST); \
 	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
 	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
+		JDK_INC="$(jdk_inc)" \
 		GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \
 		MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \
 		LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \
diff --git a/gprofng/Makefile.in b/gprofng/Makefile.in
index d660f99233f..93477ba71f7 100644
--- a/gprofng/Makefile.in
+++ b/gprofng/Makefile.in
@@ -938,6 +938,7 @@ uninstall-am:
 @TCL_TRY_TRUE@	runtest=$(RUNTEST); \
 @TCL_TRY_TRUE@	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
 @TCL_TRY_TRUE@	  $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
+@TCL_TRY_TRUE@		JDK_INC="$(jdk_inc)" \
 @TCL_TRY_TRUE@		GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \
 @TCL_TRY_TRUE@		MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \
 @TCL_TRY_TRUE@		LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \
diff --git a/gprofng/testsuite/gprofng.display/display.exp b/gprofng/testsuite/gprofng.display/display.exp
index 8ba03935867..237d577f004 100644
--- a/gprofng/testsuite/gprofng.display/display.exp
+++ b/gprofng/testsuite/gprofng.display/display.exp
@@ -54,6 +54,7 @@ switch $pltf {
   }
 }
 
+global JDK_INC
 global GPROFNG_BROKEN_JAVAC
 
 foreach line $table {
@@ -63,7 +64,8 @@ foreach line $table {
 
   verbose [file rootname $line]
   verbose running display test $line
-  if { $GPROFNG_BROKEN_JAVAC == "yes" && $dir == "jsynprog" } {
+  if { $dir == "jsynprog"
+       && ($JDK_INC == "" || $GPROFNG_BROKEN_JAVAC == "yes") } {
     unsupported $dir
   } else {
     run_display_test $dir $cflags $gprofflags

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-19  8:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19  8:36 [binutils-gdb] gprofng/testsuite: skip Java test without JDK Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).