guzba / zippy

Pure Nim implementation of deflate, zlib, gzip and zip.
MIT License
258 stars 31 forks source link

Regression in test_ziparchives.nim #44

Closed erdnaxe closed 2 years ago

erdnaxe commented 2 years ago

Before https://github.com/guzba/zippy/commit/8c431841f3130ac3705d12cd90e18d5e2ffcf26e, tests/test_ziparchives.nim was writting files in system temporary directories. This seems to no longer be the case.

This is breaking nixpkgs package tests: https://github.com/NixOS/nixpkgs/pull/176342

error: builder for '/nix/store/y81y71annic3isgqg417w2sbd5ckg430-zippy-0.9.9.drv' failed with exit code 1;
       last 10 log lines:
       >   inflating: tmp/zip/gold/nim-1.6.2/tools/vccexe/vccenv.nim
       >   inflating: tmp/zip/gold/nim-1.6.2/tools/vccexe/vccexe.nim
       >   inflating: tmp/zip/gold/nim-1.6.2/tools/vccexe/vccvswhere.nim
       >   inflating: tmp/zip/gold/nim-1.6.2/tools/vccexe/vcvarsall.nim
       >   inflating: tmp/zip/gold/nim-1.6.2/tools/website.nimf
       >   inflating: tmp/zip/gold/nim-1.6.2/tools/winrelease.nim
       > fatal.nim:53             sysFatal
       > Error: unhandled exception: test_ziparchives.nim:28:16 `fileExists(zippyPath)`  [AssertionDefect]
       > Error: execution of an external program failed: '/build/nimcache/test_ziparchives_49AB4550FB1DC32554F842F393B0A633A4FA67C8 '
       > check phase failed

Is there a reason that this test is no longer using getTempDir?

Best regards,

guzba commented 2 years ago

Sure I can switch back to using getTempDir for these tests, its not a big deal to me. Done here https://github.com/guzba/zippy/commit/7e49499b7c71b42da9a13e54d1318178a196a889 and tagged 0.9.10 in case that matters.