From patchwork Mon Sep 30 20:21:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dariqq X-Patchwork-Id: 31578 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3969A27BBEA; Mon, 30 Sep 2024 21:30:58 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D1E8027BBE2 for ; Mon, 30 Sep 2024 21:30:55 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svN2P-00016k-Ki; Mon, 30 Sep 2024 16:30:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svN2N-00016W-1L for guix-patches@gnu.org; Mon, 30 Sep 2024 16:30:31 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svN2M-0008Fg-LX for guix-patches@gnu.org; Mon, 30 Sep 2024 16:30:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=1Lq71WkwXj+a8xON/T+3S5pEnzw/5gEkxNmtXxZYm0Y=; b=TOerQGlPjzRYtI/0bvSGEObbE2nmEI4SW7YxQZTf8LYnJpn0x0DWf61UwXMeA75N9ewOtWrDvC9aqcVR1Pq+oqY6p54PVCH1dJybfQ3Jjj+YRHVg/vUg/KsEbZmLEZTLSqi6dkMMsY5NvWRz/GqHdhynoTF7lpnlPvB/2KwzWPlos6vfYB2/93gVdJpWNNGZ7kLIXHMH2V0bdC45dXgXmrsp543ryGQ06DX8RlQHw/792z9SRZcJP4o4O4r893MF+DYcHv1bx2g2ZZhcUeQgGmE1LDbP//LKEm0qup1EjhqfxORGSABGkfko9WfeAcSI8ZqvUy4sJ/ysPTynrBq7nQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svN2t-0000Hs-9X for guix-patches@gnu.org; Mon, 30 Sep 2024 16:31:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73573] [PATCH] gnu: skia: Honor tests? argument Resent-From: Dariqq Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Sep 2024 20:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73573 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73573@debbugs.gnu.org Cc: Dariqq X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1727728235361 (code B ref -1); Mon, 30 Sep 2024 20:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Sep 2024 20:30:35 +0000 Received: from localhost ([127.0.0.1]:46892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svN21-0008Se-J6 for submit@debbugs.gnu.org; Mon, 30 Sep 2024 16:30:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:48008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svN1R-0008MM-Tq for submit@debbugs.gnu.org; Mon, 30 Sep 2024 16:29:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svN0t-0000m8-N6 for guix-patches@gnu.org; Mon, 30 Sep 2024 16:29:00 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svN0r-0007qq-01 for guix-patches@gnu.org; Mon, 30 Sep 2024 16:28:59 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B7A78240027 for ; Mon, 30 Sep 2024 22:28:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1727728133; bh=jVDoAzwjE/FwueMP0Uixg3Ke3jDe9Qx/RbAd4ec/1o4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=QH3IMOgK8jGId9buK6c9KnG5oM7GJNj715eDPNw9VSSKyFXZW3SYL/Zds0j/osmcB uJFlHQTFNB89SOWKCpgcEJWTxmgPmxiBCYjVd2G0OmjZxN3kzO0p48ZXPKzUeMk7W3 HGEd4a1qAQPqsM55sd4wW7zosLDcWtE4CTtJXvkbp6SwHyndhwvK3Iiriup9Gt+1Bn 2hYoTtIUpdZEg/apragt7nlVu2oThWKBNtP4vhQzLuP579bFAb3FnYrOho40iWAL7q jEUXrySTa7XK0QGgOzvmG62u7wuUsDdOK/MGFYsBgJsS75iTNqZ916LTFJiwbPZaZR pjZ3cWS3/SgGw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XHXj06HWtz6tm8; Mon, 30 Sep 2024 22:28:52 +0200 (CEST) From: Dariqq Date: Mon, 30 Sep 2024 20:21:44 +0000 Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.65; envelope-from=dariqq@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/graphics.scm (skia): [#:phases]: Allow skipping of 'check phase. Change-Id: I529d91cf9cedfe36fa14a2ae514589810054eac8 --- The tests are failing on i686-linux. This makes it possible to use --without-tests to easily skip them. gnu/packages/graphics.scm | 262 +++++++++++++++++++------------------- 1 file changed, 132 insertions(+), 130 deletions(-) base-commit: 7e63a35ff265f5cb6efa8bbe0bbf62bb9c102cf0 diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 7ed5cdc92d..f5e0ca7352 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -2223,136 +2223,138 @@ (define-public skia Libs: -L${libdir} -lskia Cflags: -I${includedir}~%" #$output #$version))))) (replace 'check - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (let ((icu #$(this-package-native-input "icu4c-for-skia"))) - ;; Unbundle SPIRV-Tools dependency. - (substitute* "BUILD.gn" - (("deps \\+= \\[ \"//third_party/externals/spirv-tools:spvtools_val\" \\]") - "libs += [ \"SPIRV-Tools\" ]")) - (substitute* "src/sksl/SkSLCompiler.cpp" - (("\"spirv-tools/libspirv.hpp\"") - "")) - ;; Configure ICU dependency. - (substitute* "third_party/icu/BUILD.gn" - (("data_dir = \"\\.\\./externals/icu/\"") - (string-append "data_dir = \"" icu "/share/data/\"")) - (("script = \"\\.\\./externals/icu/scripts/") - (string-append "script = \"" icu "/share/scripts/")) - (("\\.\\./externals/icu/common/icudtl\\.dat") - (string-append icu "/share/data/icudtl.dat")) - (("sources = icu_sources") - "") - (("sources \\+= \\[ \"\\$data_assembly\" \\]") - "sources = [ \"$data_assembly\" ]")) - ;; Enable system libraries without is_official_build=true. - ;; This is necessary because is_official_build prevents from - ;; building dm. - (for-each - (lambda (libname) - (let ((snake (string-join (string-split libname #\-) "_"))) - (substitute* - (string-append "third_party/" libname "/BUILD.gn") - (((string-append "skia_use_system_" - snake - " = is_official_build.*")) - (string-append "skia_use_system_" snake " = true"))))) - '("zlib" "libjpeg-turbo" "harfbuzz" "libpng" "libwebp")) - ;; Configure with gn. - (invoke "gn" "gen" "out/Debug" - (string-append - "--args=" - "cc=\"gcc\" " ;defaults to 'cc' - "skia_compile_sksl_tests=false " ; disable some tests - "skia_use_perfetto=false " ; disable performance tests - "skia_use_wuffs=false " ; missing performance tool - "skia_use_system_expat=true " ; use system expat library - "skia_use_system_zlib=true " ; use system zlib library - ;; Specify where to locate the includes. - "extra_cflags=[" - (string-join - (map - (lambda (lib) - (string-append - "\"-I" - (search-input-directory - inputs - (string-append "include/" lib)) "\"")) - '("harfbuzz" - "freetype2" - "spirv-tools" - "spirv" - "unicode")) - ",") - "] " - ;; Otherwise the validate-runpath phase fails. - "extra_ldflags=[" - "\"-Wl,-rpath=" #$output "/lib\"" - "] " - ;; Disabled, otherwise the build system attempts to - ;; download the SDK at build time. - "skia_use_dng_sdk=false " - "skia_use_runtime_icu=true ")) - ;; Build dm testing tool. - (symlink - (string-append #$(this-package-native-input "gn") "/bin/gn") - "./bin/gn") - (invoke "ninja" "-C" "out/Debug" "dm") - ;; The test suite requires an X server. - (let ((xvfb (search-input-file (or native-inputs inputs) - "bin/Xvfb")) - (display ":1")) - (setenv "DISPLAY" display) - (system (string-append xvfb " " display " &"))) - ;; Run tests. - (invoke "out/Debug/dm" "-v" - "-w" "dm_output" - "--codecWritePath" "dm_output" - "--simpleCodec" - "--skip" - ;; The underscores are part of the dm syntax for - ;; skipping tests. - ;; These tests fail with segmentation fault. - "_" "_" "_" "Codec_trunc" - "_" "_" "_" "AnimCodecPlayer" - "_" "_" "_" "Codec_partialAnim" - "_" "_" "_" "Codec_InvalidImages" - "_" "_" "_" "Codec_GifInterlacedTruncated" - ;; This test started failing possibly after mesa - ;; being updated to 23.2.1 and possibly only on some - ;; hardware. - "_" "_" "_" "SkRuntimeBlender_GPU" - "_" "_" "_" "SkText_UnicodeText_Flags" - "_" "_" "_" "SkParagraph_FontStyle" - "_" "_" "_" "flight_animated_image" - ;; These tests fail because of Codec/Sk failure. - "_" "_" "_" "AndroidCodec_computeSampleSize" - "_" "_" "_" "AnimatedImage_invalidCrop" - "_" "_" "_" "AnimatedImage_scaled" - "_" "_" "_" "AnimatedImage_copyOnWrite" - "_" "_" "_" "AnimatedImage" - "_" "_" "_" "BRD_types" - "_" "_" "_" "Codec_frames" - "_" "_" "_" "Codec_partial" - "_" "_" "_" "Codec_partialWuffs" - "_" "_" "_" "Codec_requiredFrame" - "_" "_" "_" "Codec_rewind" - "_" "_" "_" "Codec_incomplete" - "_" "_" "_" "Codec_InvalidAnimated" - "_" "_" "_" "Codec_ossfuzz6274" - "_" "_" "_" "Codec_gif_out_of_palette" - "_" "_" "_" "Codec_xOffsetTooBig" - "_" "_" "_" "Codec_gif" - "_" "_" "_" "Codec_skipFullParse" - "_" "_" "_" "AndroidCodec_animated_gif" - ;; These fail for unknown reasons. - "_" "_" "_" "Gif" - "_" "_" "_" "Wuffs_seek_and_decode" - "_" "_" "_" "Skottie_Shaper_ExplicitFontMgr" - "8888" "skp" "_" "_" - "8888" "lottie" "_" "_" - "gl" "skp" "_" "_" - "gl" "lottie" "_" "_" - "_" "_" "_" "ES2BlendWithNoTexture"))))))) + (lambda* (#:key tests? inputs native-inputs #:allow-other-keys) + (if tests? + (let ((icu #$(this-package-native-input "icu4c-for-skia"))) + ;; Unbundle SPIRV-Tools dependency. + (substitute* "BUILD.gn" + (("deps \\+= \\[ \"//third_party/externals/spirv-tools:spvtools_val\" \\]") + "libs += [ \"SPIRV-Tools\" ]")) + (substitute* "src/sksl/SkSLCompiler.cpp" + (("\"spirv-tools/libspirv.hpp\"") + "")) + ;; Configure ICU dependency. + (substitute* "third_party/icu/BUILD.gn" + (("data_dir = \"\\.\\./externals/icu/\"") + (string-append "data_dir = \"" icu "/share/data/\"")) + (("script = \"\\.\\./externals/icu/scripts/") + (string-append "script = \"" icu "/share/scripts/")) + (("\\.\\./externals/icu/common/icudtl\\.dat") + (string-append icu "/share/data/icudtl.dat")) + (("sources = icu_sources") + "") + (("sources \\+= \\[ \"\\$data_assembly\" \\]") + "sources = [ \"$data_assembly\" ]")) + ;; Enable system libraries without is_official_build=true. + ;; This is necessary because is_official_build prevents from + ;; building dm. + (for-each + (lambda (libname) + (let ((snake (string-join (string-split libname #\-) "_"))) + (substitute* + (string-append "third_party/" libname "/BUILD.gn") + (((string-append "skia_use_system_" + snake + " = is_official_build.*")) + (string-append "skia_use_system_" snake " = true"))))) + '("zlib" "libjpeg-turbo" "harfbuzz" "libpng" "libwebp")) + ;; Configure with gn. + (invoke "gn" "gen" "out/Debug" + (string-append + "--args=" + "cc=\"gcc\" " ;defaults to 'cc' + "skia_compile_sksl_tests=false " ; disable some tests + "skia_use_perfetto=false " ; disable performance tests + "skia_use_wuffs=false " ; missing performance tool + "skia_use_system_expat=true " ; use system expat library + "skia_use_system_zlib=true " ; use system zlib library + ;; Specify where to locate the includes. + "extra_cflags=[" + (string-join + (map + (lambda (lib) + (string-append + "\"-I" + (search-input-directory + inputs + (string-append "include/" lib)) "\"")) + '("harfbuzz" + "freetype2" + "spirv-tools" + "spirv" + "unicode")) + ",") + "] " + ;; Otherwise the validate-runpath phase fails. + "extra_ldflags=[" + "\"-Wl,-rpath=" #$output "/lib\"" + "] " + ;; Disabled, otherwise the build system attempts to + ;; download the SDK at build time. + "skia_use_dng_sdk=false " + "skia_use_runtime_icu=true ")) + ;; Build dm testing tool. + (symlink + (string-append #$(this-package-native-input "gn") "/bin/gn") + "./bin/gn") + (invoke "ninja" "-C" "out/Debug" "dm") + ;; The test suite requires an X server. + (let ((xvfb (search-input-file (or native-inputs inputs) + "bin/Xvfb")) + (display ":1")) + (setenv "DISPLAY" display) + (system (string-append xvfb " " display " &"))) + ;; Run tests. + (invoke "out/Debug/dm" "-v" + "-w" "dm_output" + "--codecWritePath" "dm_output" + "--simpleCodec" + "--skip" + ;; The underscores are part of the dm syntax for + ;; skipping tests. + ;; These tests fail with segmentation fault. + "_" "_" "_" "Codec_trunc" + "_" "_" "_" "AnimCodecPlayer" + "_" "_" "_" "Codec_partialAnim" + "_" "_" "_" "Codec_InvalidImages" + "_" "_" "_" "Codec_GifInterlacedTruncated" + ;; This test started failing possibly after mesa + ;; being updated to 23.2.1 and possibly only on some + ;; hardware. + "_" "_" "_" "SkRuntimeBlender_GPU" + "_" "_" "_" "SkText_UnicodeText_Flags" + "_" "_" "_" "SkParagraph_FontStyle" + "_" "_" "_" "flight_animated_image" + ;; These tests fail because of Codec/Sk failure. + "_" "_" "_" "AndroidCodec_computeSampleSize" + "_" "_" "_" "AnimatedImage_invalidCrop" + "_" "_" "_" "AnimatedImage_scaled" + "_" "_" "_" "AnimatedImage_copyOnWrite" + "_" "_" "_" "AnimatedImage" + "_" "_" "_" "BRD_types" + "_" "_" "_" "Codec_frames" + "_" "_" "_" "Codec_partial" + "_" "_" "_" "Codec_partialWuffs" + "_" "_" "_" "Codec_requiredFrame" + "_" "_" "_" "Codec_rewind" + "_" "_" "_" "Codec_incomplete" + "_" "_" "_" "Codec_InvalidAnimated" + "_" "_" "_" "Codec_ossfuzz6274" + "_" "_" "_" "Codec_gif_out_of_palette" + "_" "_" "_" "Codec_xOffsetTooBig" + "_" "_" "_" "Codec_gif" + "_" "_" "_" "Codec_skipFullParse" + "_" "_" "_" "AndroidCodec_animated_gif" + ;; These fail for unknown reasons. + "_" "_" "_" "Gif" + "_" "_" "_" "Wuffs_seek_and_decode" + "_" "_" "_" "Skottie_Shaper_ExplicitFontMgr" + "8888" "skp" "_" "_" + "8888" "lottie" "_" "_" + "gl" "skp" "_" "_" + "gl" "lottie" "_" "_" + "_" "_" "_" "ES2BlendWithNoTexture")) + (format #t "test suite not run~%"))))))) (native-inputs (list gn libjpeg-turbo ninja pkg-config python-wrapper spirv-tools spirv-headers icu4c-for-skia glu xorg-server-for-tests))