Fix ctest failures on macOS/Linux#186
Open
ludomal wants to merge 7 commits into
Open
Conversation
- Add cmake/CompareTextFiles.cmake: reusable line-ending-tolerant text file comparison for CTest scripts (CRLF vs LF transparent) - basop/test_framework: Replace cmake -E compare_files with CompareTextFiles.cmake for CSV reference comparisons - freqresp: Replace cmake -E compare_files with CompareTextFiles.cmake for asciiOut.ref comparison - .gitattributes: Mark cftest1.dat as binary to prevent git from injecting CR bytes into the test input file - src/fir/CMakeLists.txt: Add -equiv 1 tolerance to filter21/22/25/26/27 verify tests (±1 LSB cross-platform floating-point rounding) - src/g711iplc/CMakeLists.txt: Add -abstol 1 to g711iplc1/3-verify (same ±1 LSB rounding differences) - src/esdru/CMakeLists.txt: Add missing -double flag to esdru1-verify - src/wmc_tool/CMakeLists.txt: Replace deprecated find_package(PythonInterp) with find_package(Python3 COMPONENTS Interpreter) All fixes are transparent: no tool source code is modified, no algorithm behavior changes. Tools produce identical output on all platforms.
added 3 commits
May 31, 2026 08:31
…seek() compfile uses POSIX-only read()/lseek() which don't exist on MSVC. Replace with standard C fread()/fseek() for cross-platform builds. Relates to openitu#142
- src/utl/signal-diff.c: replace read()/lseek()/write() with fread()/fseek()/fwrite() - src/unsup/oper.c: replace read()/lseek()/write()/close() with fread()/fseek()/fwrite()/fclose() Both files used POSIX-only I/O functions that don't exist on MSVC. Replaced with standard C FILE* operations for cross-platform builds. Relates to openitu#142
Use %lX for unsigned long arguments instead of %X. Relates to openitu#34
4159f13 to
1e9aa7d
Compare
added 3 commits
May 31, 2026 15:38
On Windows, rename() cannot move files across directories. The old get_tmp_name() created a temp file in CWD (from tmpnam), but when the input file is an absolute path in a different directory, rename() fails. Now creates the temp file in the same directory as the input.
Fixes sb2 test failure on Windows where: - Source tree files may be read-only - CTest runs tests in parallel (race condition) - rename() fails across directories
- wmc_tool: quote glob patterns in add_test() so CTest passes them as literals to the Python script (which expands them internally). Fixes container environments where shell expansion fails. - g726-vbr1/vbr3-verify: use signal-diff -equiv 1 instead of exact cf comparison. ARM32 FPU produces ±1 LSB rounding differences in A-law/mu-law conversion compared to x86_64 reference files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix ctest failures on macOS/Linux
Summary
Fix test infrastructure issues that cause ~280 ctest failures on macOS and Linux. Replace non-portable POSIX I/O with standard C in test utilities. All fixes are transparent to tool algorithms (tools produce identical output on all platforms).
This PR:
Changes
cmake -E compare_filesfailsCompareTextFiles.cmakemodule for CRLF-tolerant comparisonasciiOut.refCompareTextFiles.cmakemodule for CRLF-tolerant comparisoncftest1.datcorrupted bygit autocrlf(binary file misidentified as text,\n→\r\nadds 46 bytes).gitattributesmarks file asbinary-equiv 1tolerance (consistent with all other filter tests)-abstol 1tolerance-doubleflag)-doubleflag tocfcommandfind_package(PythonInterp)fails on modern CMake (PYTHON_EXECUTABLEis empty)find_package(Python3 COMPONENTS Interpreter)read()/lseek()/fileno()— non-portable on MSVCfread()/fseek()usingFILE*read()/lseek()/write()— non-portable on MSVCfread()/fseek()/fwrite()read()/lseek()/write()/close()— non-portable on MSVCfread()/fseek()/fwrite()/fclose()%Xformat used forunsigned longargs — compiler warnings%lXformat specifierNew files
cmake/CompareTextFiles.cmake-Pscripts in CTest.src/basop/test_framework/compare_basop_csv.cmake-Pscript wrappingCompareTextFiles.cmakefor basop CSV refssrc/freqresp/compare_freqresp_text.cmake-Pscript wrappingCompareTextFiles.cmakefor freqresp ASCII ref.gitattributescftest1.datas binaryImpact