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

Disable specs that break on MinGW-w64 #15116

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions spec/compiler/codegen/pointer_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -492,28 +492,33 @@ describe "Code gen: pointer" do
)).to_b.should be_true
end

it "takes pointerof lib external var" do
test_c(
%(
int external_var = 0;
),
%(
lib LibFoo
$external_var : Int32
end

LibFoo.external_var = 1

ptr = pointerof(LibFoo.external_var)
x = ptr.value

ptr.value = 10
y = ptr.value

ptr.value = 100
z = LibFoo.external_var

x + y + z
), &.to_i.should eq(111))
end
# FIXME: `$external_var` implies __declspec(dllimport), but we only have an
# object file, so MinGW-w64 fails linking (actually MSVC also emits an
# LNK4217 linker warning)
{% unless flag?(:win32) && flag?(:gnu) %}
it "takes pointerof lib external var" do
test_c(
%(
int external_var = 0;
),
%(
lib LibFoo
$external_var : Int32
end

LibFoo.external_var = 1

ptr = pointerof(LibFoo.external_var)
x = ptr.value

ptr.value = 10
y = ptr.value

ptr.value = 100
z = LibFoo.external_var

x + y + z
), &.to_i.should eq(111))
end
{% end %}
end
2 changes: 1 addition & 1 deletion spec/compiler/codegen/thread_local_spec.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% skip_file if flag?(:openbsd) %}
{% skip_file if flag?(:openbsd) || (flag?(:win32) && flag?(:gnu)) %}

require "../../spec_helper"

Expand Down
8 changes: 8 additions & 0 deletions spec/std/kernel_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ describe "PROGRAM_NAME" do
pending! "Example is broken in Nix shell (#12332)"
end

# MSYS2: gcc/ld doesn't support unicode paths
# https://github.com/msys2/MINGW-packages/issues/17812
{% if flag?(:windows) %}
if ENV["MSYSTEM"]?
pending! "Example is broken in MSYS2 shell"
end
{% end %}

File.write(source_file, "File.basename(PROGRAM_NAME).inspect(STDOUT)")

compile_file(source_file, bin_name: "×‽😂") do |executable_file|
Expand Down
Loading