diff options
| author | bors <bors@rust-lang.org> | 2014-04-27 20:31:37 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-27 20:31:37 -0700 |
| commit | 4e55bc7ac353b6968995f6464ac27d0aba6cf7e0 (patch) | |
| tree | 4a3b1b09552d2f33e6d9435208bd71bdb143bef6 /src/test | |
| parent | ff25d62165cbd74e98c569aa74feedbb3ca181e3 (diff) | |
| parent | 405861ed0a87ca67e34882d8c444c4cb2f34ab7c (diff) | |
| download | rust-4e55bc7ac353b6968995f6464ac27d0aba6cf7e0.tar.gz rust-4e55bc7ac353b6968995f6464ac27d0aba6cf7e0.zip | |
auto merge of #13795 : klutzy/rust/win-make-check, r=alexcrichton
Fixes #12303. Also contains a partial fix for `make check` failure.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-make/c-link-to-rust-staticlib/Makefile | 4 | ||||
| -rw-r--r-- | src/test/run-make/dep-info-custom/Makefile | 9 | ||||
| -rw-r--r-- | src/test/run-make/dep-info/Makefile | 10 | ||||
| -rw-r--r-- | src/test/run-make/lto-smoke-c/Makefile | 4 | ||||
| -rw-r--r-- | src/test/run-make/no-intermediate-extras/foo.rs | 14 | ||||
| -rw-r--r-- | src/test/run-make/obey-crate-type-flag/Makefile | 6 | ||||
| -rw-r--r-- | src/test/run-make/output-type-permutations/Makefile | 10 | ||||
| -rw-r--r-- | src/test/run-make/prune-link-args/Makefile | 5 | ||||
| -rw-r--r-- | src/test/run-make/rustdoc-hidden-line/Makefile | 8 | ||||
| -rw-r--r-- | src/test/run-make/symlinked-libraries/Makefile | 8 | ||||
| -rw-r--r-- | src/test/run-make/tools.mk | 18 | ||||
| -rw-r--r-- | src/test/run-make/unicode-input/Makefile | 8 | ||||
| -rw-r--r-- | src/test/run-make/weird-output-filenames/Makefile | 2 | ||||
| -rw-r--r-- | src/test/run-pass/struct-lit-functional-no-fields.rs (renamed from src/test/run-pass/struct-lit-functional-update-no-fields.rs) | 0 |
14 files changed, 94 insertions, 12 deletions
diff --git a/src/test/run-make/c-link-to-rust-staticlib/Makefile b/src/test/run-make/c-link-to-rust-staticlib/Makefile index 78ac1f66bfc..7312a65c812 100644 --- a/src/test/run-make/c-link-to-rust-staticlib/Makefile +++ b/src/test/run-make/c-link-to-rust-staticlib/Makefile @@ -1,10 +1,12 @@ -include ../tools.mk +ifndef IS_WINDOWS ifneq ($(shell uname),Darwin) EXTRAFLAGS := -lm -lrt -ldl -lpthread endif +endif -# FIXME +# FIXME: ignore freebsd ifneq ($(shell uname),FreeBSD) all: $(RUSTC) foo.rs diff --git a/src/test/run-make/dep-info-custom/Makefile b/src/test/run-make/dep-info-custom/Makefile index ca70ccae3da..efa6dfe981b 100644 --- a/src/test/run-make/dep-info-custom/Makefile +++ b/src/test/run-make/dep-info-custom/Makefile @@ -1,7 +1,9 @@ -include ../tools.mk -# FIXME +# FIXME: ignore freebsd/windows +# (windows: see `../dep-info/Makefile`) ifneq ($(shell uname),FreeBSD) +ifndef IS_WINDOWS all: $(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs sleep 1 @@ -16,3 +18,8 @@ else all: endif + +else +all: + +endif diff --git a/src/test/run-make/dep-info/Makefile b/src/test/run-make/dep-info/Makefile index 277e7ad6294..6835ef34b0b 100644 --- a/src/test/run-make/dep-info/Makefile +++ b/src/test/run-make/dep-info/Makefile @@ -1,6 +1,11 @@ -include ../tools.mk +# FIXME: ignore freebsd/windows +# 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) --dep-info --crate-type=lib lib.rs sleep 2 @@ -16,3 +21,8 @@ else all: endif + +else +all: + +endif diff --git a/src/test/run-make/lto-smoke-c/Makefile b/src/test/run-make/lto-smoke-c/Makefile index de8588bac9b..85b8d0e2dd8 100644 --- a/src/test/run-make/lto-smoke-c/Makefile +++ b/src/test/run-make/lto-smoke-c/Makefile @@ -1,5 +1,8 @@ -include ../tools.mk +ifdef IS_WINDOWS + EXTRAFLAGS := +else ifeq ($(shell uname),Darwin) else ifeq ($(shell uname),FreeBSD) @@ -8,6 +11,7 @@ else EXTRAFLAGS := -lm -lrt -ldl -lpthread endif endif +endif # Apparently older versions of GCC segfault if -g is passed... CC := $(CC:-g=) diff --git a/src/test/run-make/no-intermediate-extras/foo.rs b/src/test/run-make/no-intermediate-extras/foo.rs index e69de29bb2d..60a7f067476 100644 --- a/src/test/run-make/no-intermediate-extras/foo.rs +++ b/src/test/run-make/no-intermediate-extras/foo.rs @@ -0,0 +1,14 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// FIXME #13793 +#[test] +fn test_dummy() { +} diff --git a/src/test/run-make/obey-crate-type-flag/Makefile b/src/test/run-make/obey-crate-type-flag/Makefile index c28bc7c7b5e..a3c58a6bf17 100644 --- a/src/test/run-make/obey-crate-type-flag/Makefile +++ b/src/test/run-make/obey-crate-type-flag/Makefile @@ -7,7 +7,7 @@ # fail if an rlib was built all: $(RUSTC) test.rs - rm $(TMPDIR)/libtest*.rlib - rm $(TMPDIR)/libtest* + rm $(TMPDIR)/$(call RLIB_GLOB,test) + rm $(TMPDIR)/$(call DYLIB_GLOB,test) $(RUSTC) --crate-type dylib test.rs - rm $(TMPDIR)/libtest*.rlib && exit 1 || exit 0 + rm $(TMPDIR)/$(call RLIB_GLOB,test) && exit 1 || exit 0 diff --git a/src/test/run-make/output-type-permutations/Makefile b/src/test/run-make/output-type-permutations/Makefile index 94e0ce83343..5a309cddeb1 100644 --- a/src/test/run-make/output-type-permutations/Makefile +++ b/src/test/run-make/output-type-permutations/Makefile @@ -6,13 +6,13 @@ all: rm $(TMPDIR)/$(call DYLIB_GLOB,bar) rm $(TMPDIR)/$(call STATICLIB_GLOB,bar) $(RUSTC) foo.rs --crate-type=bin - rm $(TMPDIR)/bar + rm $(TMPDIR)/$(call BIN,bar) $(RUSTC) foo.rs --emit=asm,ir,bc,obj,link rm $(TMPDIR)/bar.ll rm $(TMPDIR)/bar.bc rm $(TMPDIR)/bar.s rm $(TMPDIR)/bar.o - rm $(TMPDIR)/bar + rm $(TMPDIR)/$(call BIN,bar) $(RUSTC) foo.rs --emit=asm,ir,bc,obj,link --crate-type=staticlib rm $(TMPDIR)/bar.ll rm $(TMPDIR)/bar.s @@ -27,15 +27,15 @@ all: $(RUSTC) foo.rs --emit=obj -o $(TMPDIR)/foo rm $(TMPDIR)/foo $(RUSTC) foo.rs --emit=link -o $(TMPDIR)/foo - rm $(TMPDIR)/foo + rm $(TMPDIR)/$(call BIN,foo) $(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/foo rm $(TMPDIR)/foo $(RUSTC) foo.rs --crate-type=dylib -o $(TMPDIR)/foo - rm $(TMPDIR)/foo + rm $(TMPDIR)/$(call BIN,foo) # FIXME 13794 $(RUSTC) foo.rs --crate-type=staticlib -o $(TMPDIR)/foo rm $(TMPDIR)/foo $(RUSTC) foo.rs --crate-type=bin -o $(TMPDIR)/foo - rm $(TMPDIR)/foo + rm $(TMPDIR)/$(call BIN,foo) mv $(TMPDIR)/bar.bc $(TMPDIR)/foo.bc $(RUSTC) foo.rs --emit=bc,link --crate-type=rlib cmp $(TMPDIR)/foo.bc $(TMPDIR)/bar.bc diff --git a/src/test/run-make/prune-link-args/Makefile b/src/test/run-make/prune-link-args/Makefile index ea7fa06f5ef..a6e219873df 100644 --- a/src/test/run-make/prune-link-args/Makefile +++ b/src/test/run-make/prune-link-args/Makefile @@ -1,6 +1,11 @@ -include ../tools.mk +ifdef IS_WINDOWS +# ignore windows +RUSTC_FLAGS = +else # Notice the space in the end, this emulates the output of pkg-config RUSTC_FLAGS = -C link-args="-lc " +endif all: $(RUSTC) $(RUSTC_FLAGS) empty.rs diff --git a/src/test/run-make/rustdoc-hidden-line/Makefile b/src/test/run-make/rustdoc-hidden-line/Makefile index 7e6f8fe105e..b67c1f66dd9 100644 --- a/src/test/run-make/rustdoc-hidden-line/Makefile +++ b/src/test/run-make/rustdoc-hidden-line/Makefile @@ -1,7 +1,15 @@ -include ../tools.mk +# FIXME ignore windows +ifndef IS_WINDOWS + all: $(RUSTDOC) --test foo.rs $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs cp verify.sh $(TMPDIR) $(call RUN,verify.sh) $(TMPDIR) + +else +all: + +endif diff --git a/src/test/run-make/symlinked-libraries/Makefile b/src/test/run-make/symlinked-libraries/Makefile index 45ef241c28f..9eb2c135230 100644 --- a/src/test/run-make/symlinked-libraries/Makefile +++ b/src/test/run-make/symlinked-libraries/Makefile @@ -1,7 +1,15 @@ -include ../tools.mk +# ignore windows: `ln` is actually `cp` on msys. +ifndef IS_WINDOWS + all: $(RUSTC) foo.rs mkdir -p $(TMPDIR)/other ln -nsf $(TMPDIR)/$(call DYLIB_GLOB,foo) $(TMPDIR)/other $(RUSTC) bar.rs -L $(TMPDIR)/other + +else +all: + +endif diff --git a/src/test/run-make/tools.mk b/src/test/run-make/tools.mk index 26e6e06c2ed..90274cdb3e7 100644 --- a/src/test/run-make/tools.mk +++ b/src/test/run-make/tools.mk @@ -10,14 +10,27 @@ FAILS = $(TMPDIR)/$(1) && exit 1 || exit 0 RLIB_GLOB = lib$(1)*.rlib STATICLIB = $(TMPDIR)/lib$(1).a STATICLIB_GLOB = lib$(1)*.a +BIN = $(1) -ifeq ($(shell uname),Darwin) +UNAME = $(shell uname) +ifneq (,$(findstring MINGW,$(UNAME))) +IS_WINDOWS=1 +endif + +ifeq ($(UNAME),Darwin) DYLIB_GLOB = lib$(1)*.dylib DYLIB = $(TMPDIR)/lib$(1).dylib else +ifdef IS_WINDOWS +DYLIB_GLOB = $(1)*.dll +DYLIB = $(TMPDIR)/$(1).dll +BIN = $(1).exe +export PATH := $(PATH):$(LD_LIBRARY_PATH) +else DYLIB_GLOB = lib$(1)*.so DYLIB = $(TMPDIR)/lib$(1).so endif +endif %.a: %.o ar crus $@ $< @@ -25,6 +38,9 @@ endif $(CC) -dynamiclib -Wl,-dylib -o $@ $< %.so: %.o $(CC) -o $@ $< -shared +%.dll: lib%.o + $(CC) -o $@ $< -shared + $(TMPDIR)/lib%.o: %.c $(CC) -c -o $@ $< diff --git a/src/test/run-make/unicode-input/Makefile b/src/test/run-make/unicode-input/Makefile index 2d6ecd3c55e..529bfc24a40 100644 --- a/src/test/run-make/unicode-input/Makefile +++ b/src/test/run-make/unicode-input/Makefile @@ -1,5 +1,8 @@ -include ../tools.mk +# FIXME ignore windows +ifndef IS_WINDOWS + all: # check that we don't ICE on unicode input, issue #11178 $(RUSTC) multiple_files.rs @@ -9,3 +12,8 @@ all: # correct length. issue #8706 $(RUSTC) span_length.rs $(call RUN,span_length) "$(RUSTC)" "$(TMPDIR)" + +else +all: + +endif diff --git a/src/test/run-make/weird-output-filenames/Makefile b/src/test/run-make/weird-output-filenames/Makefile index 9d852bce6f6..debd89d9929 100644 --- a/src/test/run-make/weird-output-filenames/Makefile +++ b/src/test/run-make/weird-output-filenames/Makefile @@ -6,4 +6,4 @@ all: $(RUSTC) foo.rs -o $(TMPDIR)/.foo.bar rm $(TMPDIR)/.foo.bar $(RUSTC) foo.rs -o $(TMPDIR)/+foo+bar - rm $(TMPDIR)/+foo+bar + rm $(TMPDIR)/$(call BIN,+foo+bar) diff --git a/src/test/run-pass/struct-lit-functional-update-no-fields.rs b/src/test/run-pass/struct-lit-functional-no-fields.rs index 6cc3e79ac67..6cc3e79ac67 100644 --- a/src/test/run-pass/struct-lit-functional-update-no-fields.rs +++ b/src/test/run-pass/struct-lit-functional-no-fields.rs |
