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

libvoikko: 'make check' failures #55

Open
Ban3 opened this issue Sep 16, 2023 · 1 comment
Open

libvoikko: 'make check' failures #55

Ban3 opened this issue Sep 16, 2023 · 1 comment

Comments

@Ban3
Copy link

Ban3 commented Sep 16, 2023

I'm packaging libvoikko, and 'make check' gets run by default by the build tools. It fails with following errors:

libvoikko 'make check' failures
--- ./test/test-suite.log ---------------------------------------------------

==========================================
   libvoikko 4.3.2: test/test-suite.log
==========================================

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: AllAutomaticTests.sh
==========================

EEEEFEEEEE
======================================================================
ERROR: testAllOkSpellerWorks (NullComponentTest.NullComponentTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/NullComponentTest.py", line 35, in setUp
    self.voikko = libvoikko.Voikko("fi-x-" + VARIANT_NAME, path = self.dataDir.getDirectory())
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/../python/libvoikko.py", line 447, in __init__
    raise VoikkoException("Initialization of Voikko failed: " + unicode_str(error.value, "UTF-8"))
libvoikko.VoikkoException: Initialization of Voikko failed: No valid dictionaries were found

======================================================================
ERROR: testNullAnalyzerWorks (NullComponentTest.NullComponentTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/NullComponentTest.py", line 35, in setUp
    self.voikko = libvoikko.Voikko("fi-x-" + VARIANT_NAME, path = self.dataDir.getDirectory())
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/../python/libvoikko.py", line 447, in __init__
    raise VoikkoException("Initialization of Voikko failed: " + unicode_str(error.value, "UTF-8"))
libvoikko.VoikkoException: Initialization of Voikko failed: No valid dictionaries were found

======================================================================
ERROR: testNullSuggestionGeneratorWorks (NullComponentTest.NullComponentTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/NullComponentTest.py", line 35, in setUp
    self.voikko = libvoikko.Voikko("fi-x-" + VARIANT_NAME, path = self.dataDir.getDirectory())
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/../python/libvoikko.py", line 447, in __init__
    raise VoikkoException("Initialization of Voikko failed: " + unicode_str(error.value, "UTF-8"))
libvoikko.VoikkoException: Initialization of Voikko failed: No valid dictionaries were found

======================================================================
ERROR: testDefaultVariantCanBeOpenedWithOldApiUsingValuesSpecifiedInApi (DictionaryInfoTest.DictionaryInfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 66, in testDefaultVariantCanBeOpenedWithOldApiUsingValuesSpecifiedInApi
    self.assertTrue(self.__tryOpenWithOldApi(u""))
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 45, in __tryOpenWithOldApi
    error = lib.voikko_init_with_path(byref(handle), variant,
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

======================================================================
ERROR: testOtherLanguagesCanBeUsed (DictionaryInfoTest.DictionaryInfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 97, in testOtherLanguagesCanBeUsed
    self.assertTrue(self.__tryOpenWithNewApi(u"dk"))
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 54, in __tryOpenWithNewApi
    handle = lib.voikkoInit(byref(error), variant,
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

======================================================================
ERROR: testVariantCanBeOpenedWithNewApiUsingBCP47LanguageTag (DictionaryInfoTest.DictionaryInfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 74, in testVariantCanBeOpenedWithNewApiUsingBCP47LanguageTag
    self.assertTrue(self.__tryOpenWithNewApi(u"fi-x-dictiona-ryinfote-st"))
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 54, in __tryOpenWithNewApi
    handle = lib.voikkoInit(byref(error), variant,
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

======================================================================
ERROR: testVariantCanBeOpenedWithOldApiUsingFullNameAsIs (DictionaryInfoTest.DictionaryInfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 63, in testVariantCanBeOpenedWithOldApiUsingFullNameAsIs
    self.assertTrue(self.__tryOpenWithOldApi(VARIANT_NAME))
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 45, in __tryOpenWithOldApi
    error = lib.voikko_init_with_path(byref(handle), variant,
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

======================================================================
ERROR: testVariantCannotBeOpenedWithNewApiUsingOtherValues (DictionaryInfoTest.DictionaryInfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 83, in testVariantCannotBeOpenedWithNewApiUsingOtherValues
    self.assertFalse(self.__tryOpenWithNewApi(VARIANT_NAME))
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 54, in __tryOpenWithNewApi
    handle = lib.voikkoInit(byref(error), variant,
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

======================================================================
ERROR: testVariantCannotBeOpenedWithOldApiUsingOtherValues (DictionaryInfoTest.DictionaryInfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 71, in testVariantCannotBeOpenedWithOldApiUsingOtherValues
    self.assertFalse(self.__tryOpenWithOldApi(u"ksajdlaksjdkasl"))
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 45, in __tryOpenWithOldApi
    error = lib.voikko_init_with_path(byref(handle), variant,
ctypes.ArgumentError: argument 2: <class 'TypeError'>: wrong type

======================================================================
FAIL: testListSupportedSpellingLanguagesReturnsFinnish (DictionaryInfoTest.DictionaryInfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-libvoikko-4.3.2.drv-0/libvoikko-4.3.2/test/DictionaryInfoTest.py", line 40, in testListSupportedSpellingLanguagesReturnsFinnish
    self.assertTrue(u"fi" in languages)
AssertionError: False is not true

----------------------------------------------------------------------

Looking at the tests, I'm assuming it can't find the dictionary because the tests are still using a V2 dictionary. The rest is also probably due to bitrot.

Tests can be skipped, but maybe the outdated tests could be disabled by default?

@hatapitk
Copy link
Member

I think disabling the tests by default would be the best option.

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

2 participants