diff mbox series

[libphobos] Fix libphobos.shared testsuite for multilib tests

Message ID 20181117150709.10878-1-johannespfau@gmail.com
State New
Headers show
Series [libphobos] Fix libphobos.shared testsuite for multilib tests | expand

Commit Message

Johannes Pfau Nov. 17, 2018, 3:07 p.m. UTC
Hi,

the loadDR test in the libphobos.shared testsuite tries to dynamically load the phobos library. The path for the library currently points to the main multilib variant phobos library, causing other multilib variants to fail the test. The attached patch uses $blddir instead of $objdir to fix this issue.

---
libphobos/ChangeLog:

2018-11-17  Johannes Pfau  <johannespfau@gmail.com>

    PR d/87824
    * testsuite/libphobos.shared/shared.exp: Set proper path to phobos library for multilib builds.

Comments

Iain Buclaw Nov. 22, 2018, 6:15 a.m. UTC | #1
On Sat, 17 Nov 2018 at 16:07, Johannes Pfau <johannespfau@gmail.com> wrote:
>
> Hi,
>
> the loadDR test in the libphobos.shared testsuite tries to dynamically load the phobos library. The path for the library currently points to the main multilib variant phobos library, causing other multilib variants to fail the test. The attached patch uses $blddir instead of $objdir to fix this issue.
>
> ---
> libphobos/ChangeLog:
>
> 2018-11-17  Johannes Pfau  <johannespfau@gmail.com>
>
>     PR d/87824
>     * testsuite/libphobos.shared/shared.exp: Set proper path to phobos library for multilib builds.
>
> diff --git a/libphobos/testsuite/libphobos.shared/shared.exp b/libphobos/testsuite/libphobos.shared/shared.exp
> index 5555b3bdd..623e06259 100644
> --- a/libphobos/testsuite/libphobos.shared/shared.exp
> +++ b/libphobos/testsuite/libphobos.shared/shared.exp
> @@ -94,7 +94,7 @@ if { [is-effective-target dlopen] && [is-effective-target pthread] } {
>      dg-test "$srcdir/$subdir/host.c" "-ldl -pthread" "$DEFAULT_CFLAGS"
>
>      # Test requires a command line argument to be passed to the program.
> -    set libphobos_run_args "$objdir/../src/.libs/libgphobos.so"
> +    set libphobos_run_args "${blddir}/src/.libs/libgphobos.${shlib_ext}"
>      dg-test "$srcdir/$subdir/loadDR.c" "-ldl -pthread -g" "$DEFAULT_CFLAGS"
>      set libphobos_run_args ""
>  }

OK.

I've checked and committed this, however perhaps we should get you
write after approval set-up.
diff mbox series

Patch

diff --git a/libphobos/testsuite/libphobos.shared/shared.exp b/libphobos/testsuite/libphobos.shared/shared.exp
index 5555b3bdd..623e06259 100644
--- a/libphobos/testsuite/libphobos.shared/shared.exp
+++ b/libphobos/testsuite/libphobos.shared/shared.exp
@@ -94,7 +94,7 @@  if { [is-effective-target dlopen] && [is-effective-target pthread] } {
     dg-test "$srcdir/$subdir/host.c" "-ldl -pthread" "$DEFAULT_CFLAGS"
 
     # Test requires a command line argument to be passed to the program.
-    set libphobos_run_args "$objdir/../src/.libs/libgphobos.so"
+    set libphobos_run_args "${blddir}/src/.libs/libgphobos.${shlib_ext}"
     dg-test "$srcdir/$subdir/loadDR.c" "-ldl -pthread -g" "$DEFAULT_CFLAGS"
     set libphobos_run_args ""
 }