-
Notifications
You must be signed in to change notification settings - Fork 13.4k
use ignore directives for run-make tests #57388
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
-include ../tools.mk | ||
|
||
# ignore-macos | ||
# | ||
# This hits an assertion in the linker on older versions of osx apparently | ||
ifeq ($(shell uname),Darwin) | ||
all: | ||
echo ignored | ||
else | ||
|
||
all: $(call DYLIB,cfoo) | ||
$(RUSTC) foo.rs -C prefer-dynamic | ||
$(RUSTC) bar.rs | ||
$(call RUN,bar) | ||
$(call REMOVE_DYLIBS,cfoo) | ||
$(call FAIL,bar) | ||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
-include ../tools.mk | ||
|
||
# ignore-macos | ||
# | ||
# This hits an assertion in the linker on older versions of osx apparently | ||
|
||
# This overrides the LD_LIBRARY_PATH for RUN | ||
TARGET_RPATH_DIR:=$(TARGET_RPATH_DIR):$(TMPDIR) | ||
|
||
# This hits an assertion in the linker on older versions of osx apparently | ||
ifeq ($(shell uname),Darwin) | ||
all: | ||
echo ignored | ||
else | ||
all: $(call DYLIB,cfoo) | ||
$(RUSTC) foo.rs | ||
$(RUSTC) bar.rs | ||
$(call RUN,bar) | ||
$(call REMOVE_DYLIBS,cfoo) | ||
$(call FAIL,bar) | ||
endif |
10 changes: 3 additions & 7 deletions
10
src/test/run-make-fulldeps/c-link-to-rust-staticlib/Makefile
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
-include ../tools.mk | ||
|
||
# FIXME: ignore freebsd | ||
ifneq ($(shell uname),FreeBSD) | ||
# ignore-freebsd | ||
# FIXME | ||
|
||
all: | ||
$(RUSTC) foo.rs | ||
$(CC) bar.c $(call STATICLIB,foo) $(call OUT_EXE,bar) \ | ||
$(EXTRACFLAGS) $(EXTRACXXFLAGS) | ||
$(call RUN,bar) | ||
rm $(call STATICLIB,foo) | ||
$(call RUN,bar) | ||
|
||
else | ||
all: | ||
|
||
endif |
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
12 changes: 2 additions & 10 deletions
12
src/test/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,9 @@ | ||
-include ../tools.mk | ||
|
||
ifneq (,$(findstring MINGW,$(UNAME))) | ||
ifndef IS_MSVC | ||
# only-mingw | ||
|
||
all: | ||
$(CXX) foo.cpp -c -o $(TMPDIR)/foo.o | ||
$(AR) crus $(TMPDIR)/libfoo.a $(TMPDIR)/foo.o | ||
$(RUSTC) foo.rs -lfoo -lstdc++ | ||
$(call RUN,foo) | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,13 @@ | ||
-include ../tools.mk | ||
|
||
# ignore-windows | ||
# ignore-macos | ||
# min-llvm-version 6.0 | ||
# | ||
# This feature only works when the output object format is ELF so we ignore | ||
# macOS and Windows | ||
ifdef IS_WINDOWS | ||
# Do nothing on Windows. | ||
all: | ||
exit 0 | ||
else ifneq (,$(filter $(TARGET),i686-apple-darwin x86_64-apple-darwin)) | ||
# Do nothing on macOS. | ||
all: | ||
exit 0 | ||
else | ||
|
||
# check that the .stack_sizes section is generated | ||
# this test requires LLVM >= 6.0.0 | ||
vers = $(shell $(RUSTC) -Vv) | ||
ifneq (,$(findstring LLVM version: 3,$(vers))) | ||
all: | ||
exit 0 | ||
else ifneq (,$(findstring LLVM version: 4,$(vers))) | ||
all: | ||
exit 0 | ||
else ifneq (,$(findstring LLVM version: 5,$(vers))) | ||
all: | ||
exit 0 | ||
else | ||
all: | ||
$(RUSTC) -C opt-level=3 -Z emit-stack-sizes --emit=obj foo.rs | ||
size -A $(TMPDIR)/foo.o | $(CGREP) .stack_sizes | ||
endif | ||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
-include ../tools.mk | ||
|
||
# ignore-windows | ||
# ignore-macos | ||
|
||
# Test for #39529. | ||
# `-z text` causes ld to error if there are any non-PIC sections | ||
|
||
ifeq ($(UNAME),Darwin) | ||
all: | ||
else ifdef IS_WINDOWS | ||
all: | ||
else | ||
all: | ||
$(RUSTC) hello.rs -C link-args=-Wl,-z,text | ||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
-include ../tools.mk | ||
|
||
# FIXME: ignore freebsd/windows | ||
# on windows `rustc --dep-info` produces Makefile dependency with | ||
# ignore-windows | ||
# ignore-freebsd | ||
# FIXME: on windows `rustc --dep-info` produces Makefile dependency with | ||
# windows native paths (e.g. `c:\path\to\libfoo.a`) | ||
# but msys make seems to fail to recognize such paths, so test fails. | ||
ifneq ($(shell uname),FreeBSD) | ||
ifndef IS_WINDOWS | ||
|
||
all: | ||
$(RUSTC) --emit dep-info main.rs | ||
$(CGREP) "input.txt" "input.bin" "input.md" < $(TMPDIR)/main.d | ||
else | ||
all: | ||
|
||
endif | ||
|
||
else | ||
all: | ||
|
||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
-include ../tools.mk | ||
|
||
ifndef IS_WINDOWS | ||
# The assembly for exit-unreachable.rs should be shorter because it's missing | ||
# (at minimum) a return instruction. | ||
# ignore-windows | ||
# | ||
# Because of Windows exception handling, the code is not necessarily any shorter. | ||
# https://github.com/llvm-mirror/llvm/commit/64b2297786f7fd6f5fa24cdd4db0298fbf211466 | ||
|
||
all: | ||
$(RUSTC) -O --emit asm exit-ret.rs | ||
$(RUSTC) -O --emit asm exit-unreachable.rs | ||
test `wc -l < $(TMPDIR)/exit-unreachable.s` -lt `wc -l < $(TMPDIR)/exit-ret.s` | ||
else | ||
# Because of Windows exception handling, the code is not necessarily any shorter. | ||
# https://github.com/llvm-mirror/llvm/commit/64b2297786f7fd6f5fa24cdd4db0298fbf211466 | ||
all: | ||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
-include ../tools.mk | ||
|
||
ifeq ($(UNAME),Linux) | ||
# only-linux | ||
|
||
all: | ||
$(RUSTC) foo.rs | ||
$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -o $(TMPDIR)/foo | ||
$(call RUN,foo) | ||
$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -pie -fPIC -o $(TMPDIR)/foo | ||
$(call RUN,foo) | ||
else | ||
all: | ||
endif |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,12 @@ | ||
-include ../tools.mk | ||
|
||
ifeq (musl,$(findstring musl,$(TARGET))) | ||
all: skip | ||
else | ||
all: test | ||
endif | ||
# ignore-musl | ||
|
||
test: foo | ||
all: foo | ||
$(call RUN,foo) | ||
|
||
skip: | ||
echo "expected failure" | ||
|
||
foo: foo.rs $(call NATIVE_STATICLIB,foo) | ||
$(RUSTC) $< -lfoo $(EXTRACXXFLAGS) | ||
|
||
$(TMPDIR)/libfoo.o: foo.cpp | ||
$(call COMPILE_OBJ_CXX,$@,$<) | ||
|
||
.PHONY: all test skip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
-include ../tools.mk | ||
|
||
ifeq ($(findstring stage1,$(RUST_BUILD_STAGE)),stage1) | ||
# ignore stage1 | ||
all: | ||
# ignore-stage1 | ||
|
||
else | ||
all: | ||
$(RUSTC) a.rs && $(RUSTC) b.rs | ||
$(BARE_RUSTC) c.rs -L dependency=$(TMPDIR) --extern b=$(TMPDIR)/libb.rlib \ | ||
--out-dir=$(TMPDIR) | ||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
-include ../tools.mk | ||
|
||
ifeq ($(findstring stage1,$(RUST_BUILD_STAGE)),stage1) | ||
# ignore stage1 | ||
all: | ||
# ignore-stage1 | ||
|
||
else | ||
all: | ||
$(RUSTC) a.rs && $(RUSTC) b.rs && $(RUSTC) c.rs | ||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
-include ../tools.mk | ||
|
||
ifdef IS_WINDOWS | ||
# Do nothing on MSVC. | ||
all: | ||
exit 0 | ||
else | ||
# ignore-windows | ||
|
||
all: | ||
$(RUSTC) --emit=obj app.rs | ||
nm $(TMPDIR)/app.o | $(CGREP) rust_begin_unwind | ||
nm $(TMPDIR)/app.o | $(CGREP) rust_eh_personality | ||
nm $(TMPDIR)/app.o | $(CGREP) rust_oom | ||
endif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
-include ../tools.mk | ||
|
||
ifeq ($(if $(IS_WINDOWS),$(IS_MSVC),no),) | ||
# only-mingw | ||
|
||
all: empty.rs | ||
cp -r $(shell cygpath -u $(shell $(RUSTC) --print sysroot)) $(TMPDIR)/sysroot | ||
$(RUSTC) --target $(TARGET) --sysroot $(TMPDIR)/sysroot -L$(TMPDIR)/obj -Z print-link-args empty.rs | $(CGREP) 'lib\\crt2.o' | ||
mkdir -p $(TMPDIR)/obj | ||
mv $(TMPDIR)/sysroot/lib/rustlib/$(TARGET)/lib/crt2.o $(TMPDIR)/obj/crt2.o | ||
$(RUSTC) --target $(TARGET) --sysroot $(TMPDIR)/sysroot -L$(TMPDIR)/obj -Z print-link-args empty.rs | $(CGREP) 'obj\\crt2.o' | ||
|
||
else | ||
|
||
all: | ||
|
||
endif |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.