gprofng/testsuite: skip Java test without JDK
authorJan Beulich <jbeulich@suse.com>
Mon, 19 Dec 2022 08:36:21 +0000 (09:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 19 Dec 2022 08:36:21 +0000 (09:36 +0100)
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.

gprofng/Makefile.am
gprofng/Makefile.in
gprofng/testsuite/gprofng.display/display.exp

index 96f8015700885e00b9e121cd61adede63c2b832e..b90d569c09323dd5a44e3f119df678b915e98422 100644 (file)
@@ -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)" \
index d660f99233fedef9df9cae31629cd3ba57a51150..93477ba71f7572b536f2e636cd1aeedf452d7464 100644 (file)
@@ -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)" \
index 8ba039358671f6c5bb28e4e053e349cdf77272cb..237d577f004c8c5f5aa6afab88799f9168938583 100644 (file)
@@ -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