diff options
author | J0WI <J0WI@users.noreply.github.com> | 2019-12-05 12:52:11 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-12-12 16:31:59 +0000 |
commit | db28db84a99ef663f3d06025a645c6c0d72a873a (patch) | |
tree | 3dabaa0b891624d5bb95455dede9fe0f497e5fd8 /community | |
parent | c80683371f898eb4a6f96847d94c8a9770bdf528 (diff) | |
download | aports-db28db84a99ef663f3d06025a645c6c0d72a873a.tar.bz2 aports-db28db84a99ef663f3d06025a645c6c0d72a873a.tar.xz |
community/ghc: patch testsuite
Diffstat (limited to 'community')
-rw-r--r-- | community/ghc/APKBUILD | 6 | ||||
-rw-r--r-- | community/ghc/fix-testsuite.patch | 129 |
2 files changed, 133 insertions, 2 deletions
diff --git a/community/ghc/APKBUILD b/community/ghc/APKBUILD index fbe3d76f58..fcb67d0e3d 100644 --- a/community/ghc/APKBUILD +++ b/community/ghc/APKBUILD @@ -2,7 +2,7 @@ pkgname=ghc pkgver=8.6.5 _llvmver=9 -pkgrel=1 +pkgrel=2 # Normal non rc candidate _urlprefix="$pkgver" _pkgprefix="$pkgname-$pkgver" @@ -41,6 +41,7 @@ options="!strip" # we strip it manually in build() source="https://downloads.haskell.org/~ghc/$_urlprefix/$_pkgprefix-src.tar.xz https://downloads.haskell.org/~ghc/$_urlprefix/$_pkgprefix-testsuite.tar.xz 0005-buildpath-abi-stability.patch + fix-testsuite.patch " # We only need the bootstrap patch when bootstrapping a new arches ghc. @@ -186,4 +187,5 @@ dev() { } sha512sums="c08a7480200cb99e1ffbe4ce7669f552b1054054966f7e7efcbc5f98af8032e1249fa391c4fc4c7d62cc8e0be5d17fa05845177f3cea3dbcf86e6c92d40fc0f9 ghc-8.6.5-src.tar.xz 980f3934bb18876cc80b80a0eb64a9ca1dfaa7f4d8b0761f5d733a6583053e38b231445388b992b26ec1ad5f569b6385dbe60f96381794f5577964979c253e16 ghc-8.6.5-testsuite.tar.xz -e1c2cef06d307eda4b35521204e95eb54ace5dbcd22de659e95356f884b4424d6304365e4ab45c5116192cba4c095e2e91114bc7cb73d7c7173a7035287d0854 0005-buildpath-abi-stability.patch" +e1c2cef06d307eda4b35521204e95eb54ace5dbcd22de659e95356f884b4424d6304365e4ab45c5116192cba4c095e2e91114bc7cb73d7c7173a7035287d0854 0005-buildpath-abi-stability.patch +6be1706f430883ff71bcbf18c2d17add6f54b6c4eaf902f519bb7c553acc8922f7eb718eda0a5ec8a108c91eb66da1471b45c4a03b71f2019b6dc16b27c3b8bb fix-testsuite.patch" diff --git a/community/ghc/fix-testsuite.patch b/community/ghc/fix-testsuite.patch new file mode 100644 index 0000000000..2d14d19d9d --- /dev/null +++ b/community/ghc/fix-testsuite.patch @@ -0,0 +1,129 @@ +From 43fd712b4f679fe00d6d75c8bc088357052a0365 Mon Sep 17 00:00:00 2001 +From: Ben Gamari <ben@smart-cactus.org> +Date: Tue, 11 Jun 2019 09:54:55 -0400 +Subject: [PATCH] testsuite: A more portable solution to #9399 + +Previously we used an awful hybrid batch script/Bourne shell script to +allow this test to run both on Windows and Linux (fixing #9399). +However, this breaks on some libc implementations (e.g. musl). Fix this. + +Fixes #16798. +--- + libraries/base/tests/all.T | 28 ++++++++++++++++++------- + libraries/base/tests/enum01.hs | 4 ---- + libraries/base/tests/enum02.hs | 4 ---- + libraries/base/tests/enum03.hs | 4 ---- + libraries/base/tests/enum_processor.bat | 6 ------ + libraries/base/tests/enum_processor.py | 2 ++ + 6 files changed, 23 insertions(+), 25 deletions(-) + mode change 100644 => 100755 libraries/base/tests/enum_processor.py + +diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T +index e64ca40006..33e9e196a8 100644 +--- a/libraries/base/tests/all.T ++++ b/libraries/base/tests/all.T +@@ -94,13 +94,27 @@ test('dynamic004', omit_ways(['normal', 'threaded1', 'ghci']), compile_and_ + test('dynamic005', normal, compile_and_run, ['']) + + enum_setups = [when(fast(), skip)] +-test('enum01', [extra_files(['enum_processor.bat', 'enum_processor.py']), +- enum_setups], compile_and_run, ['']) +-test('enum02', [extra_files(['enum_processor.bat', 'enum_processor.py']), +- enum_setups], compile_and_run, ['']) +-test('enum03', [extra_files(['enum_processor.bat', 'enum_processor.py']), +- enum_setups], compile_and_run, ['']) +-test('enum04', normal, compile_and_run, ['']) ++def enum_test(name): ++ """ ++ These tests have a funky Python preprocessor which require some headstands ++ to run on Windows. ++ """ ++ if opsys('mingw32'): ++ test(name, ++ [when(opsys('mingw32'), extra_files(['enum_processor.bat'])), ++ extra_files(['enum_processor.py'])], ++ compile_and_run, ++ ['-F -pgmF ./enum_processor.bat']) ++ else: ++ test(name, ++ [extra_files(['enum_processor.py'])], ++ compile_and_run, ++ ['-F -pgmF ./enum_processor.py']) ++ ++enum_test('enum01') ++enum_test('enum02') ++enum_test('enum03') ++test('enum04', normal, compile_and_run, ['']) + + test('exceptionsrun001', normal, compile_and_run, ['']) + test('exceptionsrun002', normal, compile_and_run, ['']) +diff --git a/libraries/base/tests/enum01.hs b/libraries/base/tests/enum01.hs +index 5aea7dea4d..4dfc29978c 100644 +--- a/libraries/base/tests/enum01.hs ++++ b/libraries/base/tests/enum01.hs +@@ -1,8 +1,4 @@ + -- !!! Testing the Prelude's Enum instances. +-{-# OPTIONS_GHC -F -pgmF ./enum_processor.bat #-} +--- The processor is a non-CPP-based equivalent of +--- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) }) +--- which is not portable to clang + + module Main(main) where + +diff --git a/libraries/base/tests/enum02.hs b/libraries/base/tests/enum02.hs +index 2d06f95f90..3741880f57 100644 +--- a/libraries/base/tests/enum02.hs ++++ b/libraries/base/tests/enum02.hs +@@ -1,8 +1,4 @@ + -- !!! Testing the Int Enum instances. +-{-# OPTIONS_GHC -F -pgmF ./enum_processor.bat #-} +--- The processor is a non-CPP-based equivalent of +--- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) }) +--- which is not portable to clang + + module Main(main) where + +diff --git a/libraries/base/tests/enum03.hs b/libraries/base/tests/enum03.hs +index 28d02d1c13..a701df4501 100644 +--- a/libraries/base/tests/enum03.hs ++++ b/libraries/base/tests/enum03.hs +@@ -1,8 +1,4 @@ + -- !!! Testing the Word Enum instances. +-{-# OPTIONS_GHC -F -pgmF ./enum_processor.bat #-} +--- The processor is a non-CPP-based equivalent of +--- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) }) +--- which is not portable to clang + + module Main(main) where + +diff --git a/libraries/base/tests/enum_processor.bat b/libraries/base/tests/enum_processor.bat +index 2b13a7db07..6f9eb0fd29 100755 +--- a/libraries/base/tests/enum_processor.bat ++++ b/libraries/base/tests/enum_processor.bat +@@ -1,11 +1,5 @@ + :;# Problem: GHC on Windows doesn't like '-pgmF ./enum_processor.py'. + :;# See ticket:365#comment:7 for details. + :;# +-:;# Workaround: this file, which functions both as a Windows .bat script and a +-:;# Unix shell script. Hacky, but it seems to work. + +-:;# Starts with a ':', to skip on Windows. +-:; "${PYTHON}" enum_processor.py $@; exit $? +- +-:;# Windows only: + %PYTHON% enum_processor.py %* +diff --git a/libraries/base/tests/enum_processor.py b/libraries/base/tests/enum_processor.py +old mode 100644 +new mode 100755 +index 15243f11ff..b4ca3e9797 +--- a/libraries/base/tests/enum_processor.py ++++ b/libraries/base/tests/enum_processor.py +@@ -1,3 +1,5 @@ ++#!/usr/bin/env python3 ++ + # The rough equivalent of the traditional CPP: + # #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) }) + # which is not portable to clang. +-- +2.22.0 + |