diff mbox series

[bug#48028,wip-gnome,v3,04/10] gnu: libsoup: Simplify adjustment of tests.

Message ID 20210426092215.31032-4-rg@raghavgururajan.name
State Accepted
Headers show
Series [bug#48028,wip-gnome,v3,01/10] gnu: gtkmm@2: Remove inheritance from gtkmm@3. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Raghav Gururajan April 26, 2021, 9:22 a.m. UTC
Switch from using mutiple C files to single meson.build file.

* gnu/packages/gnome.scm (libsoup)[phases](adjust-tests): Modify.
---
 gnu/packages/gnome.scm | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

Comments

Leo Prikler April 26, 2021, 9:42 a.m. UTC | #1
Am Montag, den 26.04.2021, 05:22 -0400 schrieb Raghav Gururajan:
> Switch from using mutiple C files to single meson.build file.
> 
> * gnu/packages/gnome.scm (libsoup)[phases](adjust-tests): Modify.
> ---
>  gnu/packages/gnome.scm | 22 ++++++++--------------
>  1 file changed, 8 insertions(+), 14 deletions(-)
> 
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 97cf80c586..c8e7b55f6c 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -4927,20 +4927,14 @@ libxml to ease remote use of the RESTful
> API.")
>                 #t)))
>           (add-after 'unpack 'adjust-tests
>             (lambda _
> -             ;; This test fails due to missing /etc/nsswitch.conf
> -             ;; in the build environment.
> -             (substitute* "tests/socket-test.c"
> -               ((".*/sockets/unconnected.*") ""))
> -
> -             ;; These fail because "subdomain.localhost" does not
> resolve in
> -             ;; the build environment.
> -             (substitute* "tests/hsts-test.c"
> -               ((".*/hsts/basic.*") "")
> -               ((".*/hsts/subdomains.*") "")
> -               ((".*/hsts/superdomain.*") "")
> -               ((".*/hsts/utf8-address.*") ""))
> -             (substitute* "tests/hsts-db-test.c"
> -               ((".*/hsts-db/subdomains.*") ""))
> +             (substitute* "tests/meson.build"
> +               ;; These fail because "subdomain.localhost" does not
> resolve in
> +               ;; the build environment.
> +               (("[ \t]*\\['hsts', true, \\[\\]\\],") "")
> +               (("[ \t]*\\['hsts-db', true, \\[\\]\\],") "")
> +               ;; This test fails due to missing /etc/nsswitch.conf
> +               ;; in the build environment.
> +               (("[ \t]*\\['socket', true, \\[\\]\\],") ""))
>  
>               ;; Generate a self-signed certificate that has
> "localhost" as its
>               ;; 'dnsName'.  Failing to do that, and starting with
> GnuTLS
I'm sorry, but after a closer look, I will have to reject this patch. 
This does far more than just disable a few failing tests, it disables
all tests, that happen to lie in a file with a failing one.  Please
stick to disabling patches in the C files, or if the entire C file
fails just disable that one in meson (but try to see if you can disable
it in C as well).

Regards,
Leo
Raghav Gururajan April 26, 2021, 10:31 a.m. UTC | #2
Hi Leo!

> I'm sorry, but after a closer look, I will have to reject this patch.
> This does far more than just disable a few failing tests, it disables
> all tests, that happen to lie in a file with a failing one.  Please
> stick to disabling patches in the C files, or if the entire C file
> fails just disable that one in meson (but try to see if you can disable
> it in C as well).

No worries! Thanks for the review.

In v4, I have only disabled ssl-test via meson.build, as any of the 
tests included in ssl-test.c fails.

Regards,
RG.
diff mbox series

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 97cf80c586..c8e7b55f6c 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4927,20 +4927,14 @@  libxml to ease remote use of the RESTful API.")
                #t)))
          (add-after 'unpack 'adjust-tests
            (lambda _
-             ;; This test fails due to missing /etc/nsswitch.conf
-             ;; in the build environment.
-             (substitute* "tests/socket-test.c"
-               ((".*/sockets/unconnected.*") ""))
-
-             ;; These fail because "subdomain.localhost" does not resolve in
-             ;; the build environment.
-             (substitute* "tests/hsts-test.c"
-               ((".*/hsts/basic.*") "")
-               ((".*/hsts/subdomains.*") "")
-               ((".*/hsts/superdomain.*") "")
-               ((".*/hsts/utf8-address.*") ""))
-             (substitute* "tests/hsts-db-test.c"
-               ((".*/hsts-db/subdomains.*") ""))
+             (substitute* "tests/meson.build"
+               ;; These fail because "subdomain.localhost" does not resolve in
+               ;; the build environment.
+               (("[ \t]*\\['hsts', true, \\[\\]\\],") "")
+               (("[ \t]*\\['hsts-db', true, \\[\\]\\],") "")
+               ;; This test fails due to missing /etc/nsswitch.conf
+               ;; in the build environment.
+               (("[ \t]*\\['socket', true, \\[\\]\\],") ""))
 
              ;; Generate a self-signed certificate that has "localhost" as its
              ;; 'dnsName'.  Failing to do that, and starting with GnuTLS