Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test suite failure #119

Closed
peti opened this issue Mar 11, 2013 · 8 comments
Closed

test suite failure #119

peti opened this issue Mar 11, 2013 · 8 comments

Comments

@peti
Copy link

peti commented Mar 11, 2013

Configuring hakyll-4.2.1.2...
Flags chosen: checkexternal=True, previewserver=True
Dependency HUnit ==1.2.*: using HUnit-1.2.5.1
Dependency QuickCheck >=2.4 && <2.6: using QuickCheck-2.5.1.1
Dependency base ==4.*: using base-4.5.1.0
Dependency binary >=0.5 && <0.8: using binary-0.5.1.0
Dependency blaze-html >=0.5 && <0.7: using blaze-html-0.6.1.1
Dependency blaze-markup >=0.5.1 && <0.6: using blaze-markup-0.5.1.5
Dependency bytestring >=0.9 && <0.11: using bytestring-0.9.2.1
Dependency citeproc-hs >=0.3.2 && <0.4: using citeproc-hs-0.3.8
Dependency cmdargs ==0.10.*: using cmdargs-0.10.2
Dependency containers >=0.3 && <0.6: using containers-0.4.2.1
Dependency cryptohash >=0.7 && <0.9: using cryptohash-0.8.3
Dependency deepseq ==1.3.*: using deepseq-1.3.0.0
Dependency directory >=1.0 && <1.3: using directory-1.1.0.2
Dependency filepath >=1.0 && <1.4: using filepath-1.3.0.0
Dependency http-conduit >=1.8 && <1.10: using http-conduit-1.9.1
Dependency http-types >=0.7 && <0.9: using http-types-0.8.0
Dependency lrucache >=1.1.1 && <1.2: using lrucache-1.1.1.3
Dependency mtl >=1 && <2.2: using mtl-2.1.2
Dependency old-locale ==1.0.*: using old-locale-1.0.0.4
Dependency old-time >=1.0 && <1.2: using old-time-1.1.0.0
Dependency pandoc >=1.10 && <1.12: using pandoc-1.11
Dependency parsec >=3.0 && <3.2: using parsec-3.1.3
Dependency process >=1.0 && <1.2: using process-1.1.0.1
Dependency random ==1.0.*: using random-1.0.1.1
Dependency regex-base ==0.93.*: using regex-base-0.93.2
Dependency regex-tdfa ==1.1.*: using regex-tdfa-1.1.8
Dependency snap-core >=0.6 && <0.10: using snap-core-0.9.3.1
Dependency snap-server >=0.6 && <0.10: using snap-server-0.9.3.3
Dependency tagsoup >=0.12.6 && <0.13: using tagsoup-0.12.8
Dependency test-framework >=0.4 && <0.9: using test-framework-0.8
Dependency test-framework-hunit >=0.2 && <0.4: using test-framework-hunit-0.3.0
Dependency test-framework-quickcheck2 >=0.2 && <0.4: using test-framework-quickcheck2-0.3.0.1
Dependency text >=0.11 && <1.12: using text-0.11.2.3
Dependency time >=1.1 && <1.5: using time-1.4
Using Cabal-1.14.0 compiled by ghc-7.4
Using compiler: ghc-7.4.2
[...]
Running 1 test suites...
Test suite hakyll-tests: RUNNING...
Hakyll.Core.Dependencies.Tests:
  [ 1] analyze: [OK]
  [ 2] analyze: [OK]
  [ 3] analyze: [OK]
Hakyll.Core.Identifier.Tests:
  [ 1] capture: [OK]
  [ 2] capture: [OK]
  [ 3] capture: [OK]
  [ 4] capture: [OK]
  [ 5] capture: [OK]
  [ 6] capture: [OK]
  [ 7] capture: [OK]
  [ 8] capture: [OK]
  [ 9] capture: [OK]
  [10] capture: [OK]
  [11] capture: [OK]
  [12] capture: [OK]
  [13] capture: [OK]
  [14] capture: [OK]
  [15] capture: [OK]
  [ 1] matches: [OK]
  [ 2] matches: [OK]
  [ 3] matches: [OK]
  [ 4] matches: [OK]
  [ 5] matches: [OK]
  [ 6] matches: [OK]
  [ 7] matches: [OK]
  [ 8] matches: [OK]
  [ 9] matches: [OK]
Hakyll.Core.Provider.Metadata.Tests:
  [ 1] page: [OK]
  [ 2] page: [OK]
Hakyll.Core.Provider.Tests:
  case01: [OK]
Hakyll.Core.Routes.Tests:
  [ 1] runRoutes: [OK]
  [ 2] runRoutes: [OK]
  [ 3] runRoutes: [OK]
  [ 4] runRoutes: [OK]
  [ 5] runRoutes: [OK]
  [ 6] runRoutes: [OK]
  [ 7] runRoutes: [OK]
  [ 8] runRoutes: [OK]
Hakyll.Core.Rules.Tests:
  [ 1] runRules: [OK]
Hakyll.Core.Runtime.Tests:
  [ERROR] tests/data/russian.md: hGetContents: invalid argument (invalid byte sequence)
  [ 1] run: [Failed]
ERROR: _testsite/images/favicon.ico: openBinaryFile: does not exist (No such file or directory)
  [ 2] run: [OK]
Hakyll.Core.Store.Tests:
  simple get . set: [OK, passed 100 tests]
  persistent get . set: [OK, passed 100 tests]
  WrongType get . set: [OK]
Hakyll.Core.UnixFilter.Tests:
hakyll-tests: tests/data/russian.md: hGetContents: invalid argument (invalid byte sequence)
  unixFilter rev: [Failed]
ERROR: tests/data/russian.md: hGetContents: invalid argument (invalid byte sequence)
Hakyll.Core.Util.String.Tests:
  [ 1] trim: [OK]
  [ 1] replaceAll: [OK]
  [ 1] splitAll: [OK]
Hakyll.Web.Html.RelativizeUrls.Tests:
  [ 1] relativizeUrls: [OK]
  [ 2] relativizeUrls: [OK]
  [ 3] relativizeUrls: [OK]
  [ 4] relativizeUrls: [OK]
  [ 5] relativizeUrls: [OK]
Hakyll.Web.Html.Tests:
  [ 1] demoteHeaders: [OK]
  [ 1] withUrls: [OK]
  [ 2] withUrls: [OK]
  [ 3] withUrls: [OK]
  [ 4] withUrls: [OK]
  [ 5] withUrls: [OK]
  [ 6] withUrls: [OK]
  [ 1] toUrl: [OK]
  [ 2] toUrl: [OK]
  [ 3] toUrl: [OK]
  [ 1] toSiteRoot: [OK]
  [ 2] toSiteRoot: [OK]
  [ 3] toSiteRoot: [OK]
  [ 4] toSiteRoot: [OK]
  [ 1] isExternal: [OK]
  [ 2] isExternal: [OK]
  [ 3] isExternal: [OK]
  [ 4] isExternal: [OK]
  [ 1] stripTags: [OK]
  [ 2] stripTags: [OK]
  [ 3] stripTags: [OK]
  [ 1] escapeHtml: [OK]
  [ 2] escapeHtml: [OK]
Hakyll.Web.Pandoc.FileType.Tests:
  [ 1] fileType: [OK]
  [ 2] fileType: [OK]
  [ 3] fileType: [OK]
  [ 4] fileType: [OK]
Hakyll.Core.Template.Context.Tests:
  testDateField: [OK]
Hakyll.Core.Template.Tests:
  case01: [OK]
  applyJoinTemplateList: [OK]

         Properties  Test Cases   Total
 Passed  2           79           81
 Failed  0           2            2
 Total   2           81           83
Test suite hakyll-tests: FAIL
Test suite logged to: dist/test/hakyll-4.2.1.2-hakyll-tests.log
0 of 1 test suites (0 of 1 test cases) passed.
@jaspervdj
Copy link
Owner

What operating system are you using? My guess would be that $LANG is not set correctly, see http://jaspervdj.be/hakyll/tutorials/faq.html#hgetcontents-invalid-argument-or-commitbuffer-invalid-argument.

@peti
Copy link
Author

peti commented Mar 11, 2013

Wouldn't it be better if the test suite were independ on that particular environment variable? As far as I know, the encoding can be configured per-handle using the function hSetEncoding?

@jaspervdj
Copy link
Owner

I could do that, but in the Hakyll library, the files are read using readFile. This ensures we use the encoding chosen by the user (which is not always UTF-8). UTF-8 is the default encoding for Hakyll, but it is never enforced.

I can't differ from that in the test suite because then I wouldn't be testing the actual Hakyll code... so I picked UTF-8 for the tests as a default. I agree that this isn't straightforward, but I can't figure out a good solution at this point.

@peti
Copy link
Author

peti commented Mar 13, 2013

I believe that there ought to be a way to set the encodnig used for file i/o through the Hakyll API. If that feature were available, then the test suite could read and process files with a specific encoding reliably without depending on the shell environment. Furthermore, this would allow users to mix files with different encodings in the same site.

@nomeata
Copy link
Contributor

nomeata commented Apr 10, 2013

This also affects the Debian packaging, which runs the test suite as part of the automatic package building, and that needs to work in different environments.

@peti's suggestion sounds good to me.

@Fuuzetsu
Copy link

This seems gone.

@jaspervdj
Copy link
Owner

Thanks for the heads-up!

@jparsert
Copy link

I did follow the steps in the FAQ but I still get the error when including font-awesome files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants