public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Cc: Binutils <binutils@sourceware.org>
Subject: [PATCH 5/4] gprofng/testsuite: skip Java test without JDK
Date: Fri, 16 Dec 2022 10:13:36 +0100	[thread overview]
Message-ID: <0acc18cc-d246-9c2a-ba14-586c693b9e58@suse.com> (raw)
In-Reply-To: <fb6f3da8-42fc-6911-fcc9-a444bc41df0c@suse.com>

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.
---
An alternative without changing display.exp would look to be to force
GPROFNG_BROKEN_JAVAC to "yes" in the runtest invocation if $jdk_inc is
empty.

--- 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)" \
--- 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)" \
--- 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


  parent reply	other threads:[~2022-12-16  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16  8:26 [PATCH 0/4] gprofng: small testsuite adjustments Jan Beulich
2022-12-16  8:28 ` [PATCH 1/4] gprofng/testsuite: adjust linking of synprog Jan Beulich
2022-12-16  8:29 ` [PATCH 2/4] gprofng/testsuite: correct names for signal handling tests Jan Beulich
2022-12-16  8:30 ` [PATCH 3/4] gprofng/testsuite: correct line continuation in endcases.c Jan Beulich
2022-12-16  8:30 ` [PATCH 4/4] gprofng/testsuite: eliminate bogus casts Jan Beulich
2022-12-16  8:36 ` [PATCH 0/4] gprofng: small testsuite adjustments Jan Beulich
2022-12-16  9:13 ` Jan Beulich [this message]
2022-12-16 20:16 ` Vladimir Mezentsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0acc18cc-d246-9c2a-ba14-586c693b9e58@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=vladimir.mezentsev@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).