* [PATCH] t/inotify3: fail gracefully on unsupported arches
@ 2024-08-19 20:46 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-08-19 20:46 UTC (permalink / raw)
To: meta
New architectures will inevitably appear or lose support,
so ensure we fail gracefully here with some hopefully
helpful messages.
---
t/inotify3.t | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/t/inotify3.t b/t/inotify3.t
index c25c0f42..27875599 100644
--- a/t/inotify3.t
+++ b/t/inotify3.t
@@ -2,7 +2,18 @@
# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use v5.12; use PublicInbox::TestCommon;
+use Config;
+use POSIX qw(uname);
plan skip_all => 'inotify is Linux-only' if $^O ne 'linux';
+unless (eval { require PublicInbox::Inotify3 }) {
+ my (undef, undef, undef, undef, $machine) = uname();
+ diag '<cppsymbols>';
+ diag "\t$_" for (split /(?<!\\)\s+/, $Config{cppsymbols});
+ diag '</cppsymbols>';
+ diag "$_ => $Config{$_}" for qw(ptrsize sizesize);
+ plan skip_all => "inotify constants not defined on $machine";
+}
+
use_ok 'PublicInbox::Inotify3';
my $in = PublicInbox::Inotify3->new;
my $tmpdir = tmpdir;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-19 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 20:46 [PATCH] t/inotify3: fail gracefully on unsupported arches Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).