Skip to content

Commit dd02c8d

Browse files
committed
Fix compile test to ignore linker errors.
1 parent 76554de commit dd02c8d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/compile_rice_test.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@ def test_compile_bindings
1919
preset = determine_preset
2020

2121
Dir.chdir(bindings_dir) do
22-
# Configure with no-op linker (compile-only, skip linking)
23-
noop_linker = msvc? ? "cmd /c exit 0" : ":"
24-
output, success = run_cmake("--preset", preset,
25-
"-DCMAKE_CXX_CREATE_SHARED_MODULE=#{noop_linker}",
26-
"-DCMAKE_CXX_CREATE_SHARED_LIBRARY=#{noop_linker}")
22+
output, success = run_cmake("--preset", preset)
2723
flunk "CMake configure failed:\n#{output}" unless success
2824

29-
# Build (compiles only, linking is a no-op)
3025
output, success = run_cmake("--build", "build/#{preset}")
31-
flunk "CMake build failed:\n#{output}" unless success
26+
unless success
27+
# Link errors are expected (no implementations). Only fail on compile errors.
28+
compile_errors = output.lines.select { |line| line.include?("error") && !line.include?("LNK") }
29+
flunk "Compile errors:\n#{compile_errors.join}" unless compile_errors.empty?
30+
end
3231
end
3332

3433
pass

0 commit comments

Comments
 (0)