Skip to content

Commit a54b5c7

Browse files
committed
Auto merge of #57388 - euclio:runmake-explicit-ignore, r=kennytm
use ignore directives for run-make tests This makes the tests easier to read, and makes it possible to tell which tests aren't being run on the host platform. Fixes #56704.
2 parents 75f9159 + f15d20c commit a54b5c7

File tree

47 files changed

+127
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+127
-297
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
-include ../tools.mk
22

3+
# ignore-macos
4+
#
35
# This hits an assertion in the linker on older versions of osx apparently
4-
ifeq ($(shell uname),Darwin)
5-
all:
6-
echo ignored
7-
else
6+
87
all: $(call DYLIB,cfoo)
98
$(RUSTC) foo.rs -C prefer-dynamic
109
$(RUSTC) bar.rs
1110
$(call RUN,bar)
1211
$(call REMOVE_DYLIBS,cfoo)
1312
$(call FAIL,bar)
14-
endif
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
-include ../tools.mk
22

3+
# ignore-macos
4+
#
5+
# This hits an assertion in the linker on older versions of osx apparently
6+
37
# This overrides the LD_LIBRARY_PATH for RUN
48
TARGET_RPATH_DIR:=$(TARGET_RPATH_DIR):$(TMPDIR)
59

6-
# This hits an assertion in the linker on older versions of osx apparently
7-
ifeq ($(shell uname),Darwin)
8-
all:
9-
echo ignored
10-
else
1110
all: $(call DYLIB,cfoo)
1211
$(RUSTC) foo.rs
1312
$(RUSTC) bar.rs
1413
$(call RUN,bar)
1514
$(call REMOVE_DYLIBS,cfoo)
1615
$(call FAIL,bar)
17-
endif
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
-include ../tools.mk
22

3-
# FIXME: ignore freebsd
4-
ifneq ($(shell uname),FreeBSD)
3+
# ignore-freebsd
4+
# FIXME
5+
56
all:
67
$(RUSTC) foo.rs
78
$(CC) bar.c $(call STATICLIB,foo) $(call OUT_EXE,bar) \
89
$(EXTRACFLAGS) $(EXTRACXXFLAGS)
910
$(call RUN,bar)
1011
rm $(call STATICLIB,foo)
1112
$(call RUN,bar)
12-
13-
else
14-
all:
15-
16-
endif

src/test/run-make-fulldeps/cdylib-fewer-symbols/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,10 @@
33

44
-include ../tools.mk
55

6+
# ignore-windows
67
# FIXME: The __rdl_ and __rust_ symbol still remains, no matter using MSVC or GNU
78
# See https://github.com/rust-lang/rust/pull/46207#issuecomment-347561753
8-
ifdef IS_WINDOWS
9-
all:
10-
true
11-
else
9+
1210
all:
1311
$(RUSTC) foo.rs
1412
nm -g "$(call DYLIB,foo)" | $(CGREP) -v __rdl_ __rde_ __rg_ __rust_
15-
endif
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
-include ../tools.mk
22

3-
ifneq (,$(findstring MINGW,$(UNAME)))
4-
ifndef IS_MSVC
3+
# only-mingw
4+
55
all:
66
$(CXX) foo.cpp -c -o $(TMPDIR)/foo.o
77
$(AR) crus $(TMPDIR)/libfoo.a $(TMPDIR)/foo.o
88
$(RUSTC) foo.rs -lfoo -lstdc++
99
$(call RUN,foo)
10-
else
11-
all:
12-
13-
endif
14-
else
15-
all:
16-
17-
endif
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
-include ../tools.mk
22

3-
# FIXME: ignore freebsd/windows
4-
# (windows: see `../dep-info/Makefile`)
5-
ifneq ($(shell uname),FreeBSD)
6-
ifndef IS_WINDOWS
3+
# ignore-windows
4+
# ignore-freebsd
5+
# FIXME: (windows: see `../dep-info/Makefile`)
6+
77
all:
88
cp lib.rs $(TMPDIR)/
99
cp 'foo foo.rs' $(TMPDIR)/
@@ -17,12 +17,3 @@ all:
1717
pwd
1818
$(MAKE) -drf Makefile.foo
1919
rm $(TMPDIR)/done && exit 1 || exit 0
20-
else
21-
all:
22-
23-
endif
24-
25-
else
26-
all:
27-
28-
endif
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
-include ../tools.mk
22

3-
# FIXME: ignore freebsd/windows
4-
# on windows `rustc --dep-info` produces Makefile dependency with
3+
# ignore-windows
4+
# ignore-freebsd
5+
# FIXME: on windows `rustc --dep-info` produces Makefile dependency with
56
# windows native paths (e.g. `c:\path\to\libfoo.a`)
67
# but msys make seems to fail to recognize such paths, so test fails.
7-
ifneq ($(shell uname),FreeBSD)
8-
ifndef IS_WINDOWS
8+
99
all:
1010
cp *.rs $(TMPDIR)
1111
$(RUSTC) --emit dep-info,link --crate-type=lib $(TMPDIR)/lib.rs
@@ -23,12 +23,3 @@ all:
2323
rm $(TMPDIR)/bar.rs
2424
cp $(TMPDIR)/lib2.rs $(TMPDIR)/lib.rs
2525
$(MAKE) -drf Makefile.foo
26-
else
27-
all:
28-
29-
endif
30-
31-
else
32-
all:
33-
34-
endif
Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,13 @@
11
-include ../tools.mk
22

3+
# ignore-windows
4+
# ignore-macos
5+
# min-llvm-version 6.0
6+
#
37
# This feature only works when the output object format is ELF so we ignore
48
# macOS and Windows
5-
ifdef IS_WINDOWS
6-
# Do nothing on Windows.
7-
all:
8-
exit 0
9-
else ifneq (,$(filter $(TARGET),i686-apple-darwin x86_64-apple-darwin))
10-
# Do nothing on macOS.
11-
all:
12-
exit 0
13-
else
9+
1410
# check that the .stack_sizes section is generated
15-
# this test requires LLVM >= 6.0.0
16-
vers = $(shell $(RUSTC) -Vv)
17-
ifneq (,$(findstring LLVM version: 3,$(vers)))
18-
all:
19-
exit 0
20-
else ifneq (,$(findstring LLVM version: 4,$(vers)))
21-
all:
22-
exit 0
23-
else ifneq (,$(findstring LLVM version: 5,$(vers)))
24-
all:
25-
exit 0
26-
else
2711
all:
2812
$(RUSTC) -C opt-level=3 -Z emit-stack-sizes --emit=obj foo.rs
2913
size -A $(TMPDIR)/foo.o | $(CGREP) .stack_sizes
30-
endif
31-
endif
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
-include ../tools.mk
22

3+
# ignore-windows
4+
# ignore-macos
5+
36
# Test for #39529.
47
# `-z text` causes ld to error if there are any non-PIC sections
58

6-
ifeq ($(UNAME),Darwin)
7-
all:
8-
else ifdef IS_WINDOWS
9-
all:
10-
else
119
all:
1210
$(RUSTC) hello.rs -C link-args=-Wl,-z,text
13-
endif
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
-include ../tools.mk
22

3-
# FIXME: ignore freebsd/windows
4-
# on windows `rustc --dep-info` produces Makefile dependency with
3+
# ignore-windows
4+
# ignore-freebsd
5+
# FIXME: on windows `rustc --dep-info` produces Makefile dependency with
56
# windows native paths (e.g. `c:\path\to\libfoo.a`)
67
# but msys make seems to fail to recognize such paths, so test fails.
7-
ifneq ($(shell uname),FreeBSD)
8-
ifndef IS_WINDOWS
8+
99
all:
1010
$(RUSTC) --emit dep-info main.rs
1111
$(CGREP) "input.txt" "input.bin" "input.md" < $(TMPDIR)/main.d
12-
else
13-
all:
14-
15-
endif
16-
17-
else
18-
all:
19-
20-
endif

0 commit comments

Comments
 (0)