Closed Zenvie closed 3 months ago
@Zenvie we don't maintain the Arch Linux packaging for AFDKO so the amount of help we can offer here is limited. However, I can say that there's no reason to run the utfcpp tests as part of AFDKO verification -- that package is built to support the Antlr 4 C++ parser runtime. So the change you're probably looking to make here is to add a path to the specific tests
directory to the pytest
call in check()
. That will limit the pytest
's search for test data to where we store the AFDKO-specific tests.
@skef Thank you for your response.
I’ve updated the check function as follows:
check() {
cd "$_archive"
PYTHONPATH=python pytest tests
}
However, the test execution is failing with the following errors: afdko-4.0.1-2-x86_64-check.log
Possibly due to a missing file or directory. Could you assist in resolving this issue?
The tests are running without any of the binaries having been installed, or perhaps installed but not in the path. You should really consult with @alerque about the Arch infrastructure.
Yes, the check()
phase of packaging happens after build()
but before package()
(and even package()
does not install to the host, only to a blank tree used for wrapping up a tar file). That means to run tests we need to setup any necessary PATH/PYTHONPATH/etc. environment variables to find the things that were built in the build()
phase wherever they are placed as part of a noninstalled build.
Hello AFDKO Contributors,
I hope this message finds you well. I am reaching out to report an issue I’ve encountered while compiling the AFDKO package on Arch Linux. During the process, a pytest error occurred, hindering the compilation.
PKGBUILD File
```bash # Maintainer: Caleb MaclennanCheck Output
```log ============================= test session starts ============================== platform linux -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0 rootdir: /build/afdko/src/afdko-4.0.1 configfile: setup.cfg collected 1585 items / 4 errors ==================================== ERRORS ==================================== _ ERROR collecting _skbuild/linux-x86_64-3.11/cmake-build/a4/src/a4/runtime/Cpp/runtime/thirdparty/utfcpp/extern/gtest/googlemock/test/gmock_leak_test.py _ _skbuild/linux-x86_64-3.11/cmake-build/a4/src/a4/runtime/Cpp/runtime/thirdparty/utfcpp/extern/gtest/googlemock/test/gmock_leak_test.py:36: inI have attached the relevant files and outputs above for your review. Any guidance or assistance in resolving this error would be greatly appreciated. Thank you for your time and support.