ponyc: arm64 and Darwin ZHF fixes (#404240)

This commit is contained in:
Arne Keller
2025-05-06 12:09:40 +02:00
committed by GitHub
3 changed files with 76 additions and 12 deletions

View File

@@ -1,16 +1,42 @@
From e49f97eb4b0fd27b26437638db7984fbcfd3a14f Mon Sep 17 00:00:00 2001
From: Morgan Jones <me@numin.it>
Date: Sun, 4 May 2025 15:46:07 -0700
Subject: [PATCH] net: disable tests in the Nix sandbox
---
packages/net/_test.pony | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/packages/net/_test.pony b/packages/net/_test.pony
index 9044dfb1..f0ea10f7 100644
index 05462eb2..c0c6cdfa 100644
--- a/packages/net/_test.pony
+++ b/packages/net/_test.pony
@@ -26,11 +26,6 @@ actor \nodoc\ Main is TestList
test(_TestTCPThrottle)
end
@@ -15,25 +15,8 @@ actor \nodoc\ Main is TestList
new make() => None
fun tag tests(test: PonyTest) =>
- // Tests below function across all systems and are listed alphabetically
+ // (@numinit): only this test works in the Nix sandbox:
test(_TestTCPConnectionFailed)
- test(_TestTCPExpect)
- test(_TestTCPExpectOverBufferSize)
- test(_TestTCPMute)
- test(_TestTCPProxy)
- test(_TestTCPUnmute)
- test(_TestTCPWritev)
-
- // Tests below exclude windows and are listed alphabetically
- ifdef not windows then
- test(_TestTCPConnectionToClosedServerFailed)
- test(_TestTCPThrottle)
- end
-
- // Tests below exclude osx and are listed alphabetically
- ifdef not osx then
- test(_TestBroadcast)
- end
-
class \nodoc\ _TestPing is UDPNotify
let _h: TestHelper
let _ip: NetAddress
--
2.47.0

View File

@@ -0,0 +1,26 @@
From 77d703b11d298f6be88b04f7e8ca85de139e82be Mon Sep 17 00:00:00 2001
From: Morgan Jones <me@numin.it>
Date: Mon, 5 May 2025 20:34:02 -0700
Subject: [PATCH] process: disable KillLongRunningChild test
---
packages/process/_test.pony | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/process/_test.pony b/packages/process/_test.pony
index fe9fdb04..756588f9 100644
--- a/packages/process/_test.pony
+++ b/packages/process/_test.pony
@@ -18,7 +18,8 @@ actor \nodoc\ Main is TestList
test(_TestChdir)
test(_TestExpect)
test(_TestFileExecCapabilityIsRequired)
- test(_TestKillLongRunningChild)
+ // (@booxter/@numinit) Appears to be flaky.
+ // test(_TestKillLongRunningChild)
test(_TestLongRunningChild)
test(_TestNonExecutablePathResultsInExecveError)
test(_TestPrintvOrdering)
--
2.47.0

View File

@@ -19,6 +19,7 @@
which,
z3,
cctools,
procps,
}:
stdenv.mkDerivation (rec {
@@ -73,6 +74,7 @@ stdenv.mkDerivation (rec {
[
# Sandbox disallows network access, so disabling problematic networking tests
./disable-networking-tests.patch
./disable-process-tests.patch
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(replaceVars ./fix-darwin-build.patch {
@@ -102,10 +104,19 @@ stdenv.mkDerivation (rec {
--replace-fail "https://github.com/google/googletest/archive/refs/tags/v$googletestRev.tar.gz" "$NIX_BUILD_TOP/deps/googletest-$googletestRev.tar"
'';
preBuild = ''
make libs build_flags=-j$NIX_BUILD_CORES
make configure build_flags=-j$NIX_BUILD_CORES
'';
preBuild =
''
extraFlags=(build_flags=-j$NIX_BUILD_CORES)
''
+ lib.optionalString stdenv.hostPlatform.isAarch64 ''
# See this relnote about building on Raspbian:
# https://github.com/ponylang/ponyc/blob/0.46.0/.release-notes/0.45.2.md
extraFlags+=(pic_flag=-fPIC)
''
+ ''
make libs "''${extraFlags[@]}"
make configure "''${extraFlags[@]}"
'';
makeFlags = [
"PONYC_VERSION=${version}"
@@ -117,8 +128,9 @@ stdenv.mkDerivation (rec {
"-Wno-error=implicit-fallthrough"
];
# make: *** [Makefile:222: test-full-programs-release] Killed: 9
doCheck = !stdenv.hostPlatform.isDarwin;
doCheck = true;
nativeCheckInputs = [ procps ];
installPhase =
''