summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Palmquist <git@stig.io>2023-11-21 13:34:04 +0100
committerStig Palmquist <git@stig.io>2023-11-21 13:34:04 +0100
commit78cbf53e821616d3e63756ff83fa092a4914b23e (patch)
tree502b6f32545a4756547d97e29d79ee2e37060cf3
parentpython311Packages.openllm-core: 0.3.9 -> 0.4.22 (diff)
downloadnixpkgs-78cbf53e821616d3e63756ff83fa092a4914b23e.tar.gz
perlPackages.Hailo: fix tests
Add patch to tests that fixes compat with Getopt-Long-Description 0.106
-rw-r--r--pkgs/development/perl-modules/Hailo-fix-test-gld.patch28
-rw-r--r--pkgs/top-level/perl-packages.nix3
2 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/perl-modules/Hailo-fix-test-gld.patch b/pkgs/development/perl-modules/Hailo-fix-test-gld.patch
new file mode 100644
index 000000000000..24e45ac0c1ff
--- /dev/null
+++ b/pkgs/development/perl-modules/Hailo-fix-test-gld.patch
@@ -0,0 +1,28 @@
+commit ce474dbca0c95c06a85a3a329fcdbcc97b8ad317
+Author: Stig Palmquist <git@stig.io>
+Date: 2023-11-21 13:27:46 +0100
+
+ Fix t/shell.t compat with Getopt-Long-Descriptive 0.106
+
+diff --git a/t/command/shell.t b/t/command/shell.t
+index ebd67d8..a09afd2 100644
+--- a/t/command/shell.t
++++ b/t/command/shell.t
+@@ -28,7 +28,7 @@ run_ok( $app, [ '--no-help' ], "Don't help me" );
+ cmp_ok($return, '==', 1, 'Exit status is correct');
+ like($stderr, qr/^$/s, 'no stderr');
+ like($stdout, qr{usage: hailo}, 'Got usage header');
+- like($stdout, qr{progress\s+Display progress}, 'Got --progress');
++ like($stdout, qr{progress\s*(?:\(or -p\))?\s+Display progress}, 'Got --progress');
+ like($stdout, qr{files are assumed to be UTF-8 encoded}, 'Got UTF-8 note');
+ unlike($stdout, qr{examples:}, "no examples on normal output");
+ }
+@@ -75,7 +75,7 @@ run_ok( $app, [ '--no-help' ], "Don't help me" );
+ like($stderr, qr/^$/s, 'no stderr');
+ like($stdout, qr/Unknown option: blah-blah-blah/, 'Unknown option');
+ like($stdout, qr{usage: hailo}, 'Got usage header');
+- like($stdout, qr{progress\s+Display progress}, 'Got --progress');
++ like($stdout, qr{progress\s*(?:\(or -p\))?\s+Display progress}, 'Got --progress');
+ like($stdout, qr{files are assumed to be UTF-8 encoded}, 'Got UTF-8 note');
+ unlike($stdout, qr{examples:}, "no examples on error");
+
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index eafccffef9c9..639bc2ae5d8a 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -11348,6 +11348,9 @@ with self; {
buildInputs = [ BotTrainingMegaHAL BotTrainingStarCraft DataSection FileSlurp PodSection TestException TestExpect TestOutput TestScript TestScriptRun ];
propagatedBuildInputs = [ ClassLoad DBDSQLite DataDump DirSelf FileCountLines GetoptLongDescriptive IOInteractive IPCSystemSimple ListMoreUtils Moose MooseXGetopt MooseXStrictConstructor MooseXTypes RegexpCommon TermSk namespaceclean ];
nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
+ patches = [
+ ../development/perl-modules/Hailo-fix-test-gld.patch
+ ];
postPatch = ''
patchShebangs bin
'';