gnu: ruby-rubyzip: Re-instate all tests.

* gnu/packages/ruby.scm (ruby-rubyzip)
[arguments]: Do not patch ruby shebang in the patch-tests phase.
Remove the disable-problematic-tests phase.  Add the
unpatch-some-source-shebangs phase.
This commit is contained in:
Maxim Cournoyer 2023-04-11 21:35:54 -04:00
parent 5842d69824
commit f32c98c367
No known key found for this signature in database
GPG Key ID: 1260E46482E63562

View File

@ -3694,29 +3694,16 @@ Ruby Gems.")
(add-before 'check 'patch-tests (add-before 'check 'patch-tests
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "test/gentestfiles.rb" (substitute* "test/gentestfiles.rb"
(("/usr/bin/zip") (which "zip"))) (("/usr/bin/zip") (which "zip")))))
(substitute* "test/input_stream_test.rb" (add-after 'patch-source-shebangs 'unpatch-some-source-shebangs
(("/usr/bin/env ruby") (which "ruby")))))
(add-before 'check 'disable-problematic-tests
(lambda _ (lambda _
(let-syntax ((skip-tests ;; The test compare zipped files with data test files; since the
(syntax-rules () ;; zip files do not have their shebangs patched, the data files
((_ file test ...) ;; compared to their extracted version must also be left
(substitute* file ;; un-patched.
(((string-append "def " test ".*") all) (substitute* (find-files "test/data" "\\.(txt|rb)$")
(string-append (((which "ruby"))
all " skip('fails on guix')\n")) ...))))) "/usr/bin/env ruby")))))))
;; The test failures were reported here:
;; https://github.com/rubyzip/rubyzip/issues/552.
(skip-tests "test/stored_support_test.rb"
"test_read")
(skip-tests "test/stored_support_test.rb"
"test_encrypted_read")
(skip-tests "test/output_stream_test.rb"
"test_put_next_entry_using_zip_entry_creates_\
entries_with_correct_timestamps")
(skip-tests "test/file_options_test.rb"
"test_restore_times_true")))))))
(native-inputs (native-inputs
(list bundler ruby-simplecov zip unzip)) (list bundler ruby-simplecov zip unzip))
(synopsis "Ruby module is for reading and writing zip files") (synopsis "Ruby module is for reading and writing zip files")