Skip to content

Commit c888f0c

Browse files
committed
---
yaml --- r: 151158 b: refs/heads/try2 c: 35f295d h: refs/heads/master v: v3
1 parent c34d0c2 commit c888f0c

File tree

25 files changed

+237
-132
lines changed

25 files changed

+237
-132
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 4e55bc7ac353b6968995f6464ac27d0aba6cf7e0
8+
refs/heads/try2: 35f295d2a9c9df56c10200b26df79b421ec5fcbf
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/etc/maketest.py

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,26 @@
1212
import os
1313
import sys
1414

15-
# msys1/msys2 automatically converts `/abs/path1:/abs/path2` into
16-
# `c:\real\abs\path1;c:\real\abs\path2` (semicolons) if shell thinks
17-
# the value is list of paths.
18-
# this causes great confusion and error: shell and Makefile doesn't like
19-
# windows paths so it is really error-prone. revert it for peace.
20-
def normalize_path(v):
21-
# c:\path -> /c/path
22-
if ':\\' in v:
23-
v = '/' + v.replace(':\\', '/')
24-
v = v.replace('\\', '/')
25-
return v
26-
27-
28-
def putenv(name, value):
29-
if os.name == 'nt':
30-
value = normalize_path(value)
31-
os.putenv(name, value)
32-
15+
# FIXME #12303 these tests are broken on windows
16+
if os.name == 'nt':
17+
print 'ignoring make tests on windows'
18+
sys.exit(0)
3319

3420
make = sys.argv[2]
35-
putenv('RUSTC', os.path.abspath(sys.argv[3]))
36-
putenv('TMPDIR', os.path.abspath(sys.argv[4]))
37-
putenv('CC', sys.argv[5])
38-
putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
21+
os.putenv('RUSTC', os.path.abspath(sys.argv[3]))
22+
os.putenv('TMPDIR', os.path.abspath(sys.argv[4]))
23+
os.putenv('CC', sys.argv[5])
24+
os.putenv('RUSTDOC', os.path.abspath(sys.argv[6]))
3925
filt = sys.argv[7]
4026
ldpath = sys.argv[8]
4127
if ldpath != '':
42-
name = ldpath.split('=')[0]
43-
value = ldpath.split('=')[1]
44-
if os.name == 'nt' and name != 'PATH':
45-
value = ":".join(normalize_path(v) for v in value.split(";"))
46-
os.putenv(name, value)
28+
os.putenv(ldpath.split('=')[0], ldpath.split('=')[1])
4729

4830
if not filt in sys.argv[1]:
4931
sys.exit(0)
5032
print('maketest: ' + os.path.basename(os.path.dirname(sys.argv[1])))
5133

52-
path = sys.argv[1]
53-
if path[-1] == '/':
54-
# msys1 has a bug that `make` fails to include `../tools.mk` (parent dir)
55-
# if `-C path` option is given and `path` is absolute directory with
56-
# trailing slash (`c:/path/to/test/`).
57-
# the easist workaround is to remove the slash (`c:/path/to/test`).
58-
# msys2 seems to fix this problem.
59-
path = path[:-1]
60-
61-
proc = subprocess.Popen([make, '-C', path],
34+
proc = subprocess.Popen([make, '-C', sys.argv[1]],
6235
stdout = subprocess.PIPE,
6336
stderr = subprocess.PIPE)
6437
out, err = proc.communicate()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
trait A<'a, T> {
12+
fn f(&mut self) -> &'a mut T;
13+
fn p() -> T;
14+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
struct Test<'s> {
12+
func: ||: 's,
13+
}
14+
15+
fn main() {
16+
let test = ~Test { func: proc() {} };
17+
//~^ ERROR: expected `||` but found `proc()`
18+
}

branches/try2/src/test/run-make/c-link-to-rust-staticlib/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
-include ../tools.mk
22

3-
ifndef IS_WINDOWS
43
ifneq ($(shell uname),Darwin)
54
EXTRAFLAGS := -lm -lrt -ldl -lpthread
65
endif
7-
endif
86

9-
# FIXME: ignore freebsd
7+
# FIXME
108
ifneq ($(shell uname),FreeBSD)
119
all:
1210
$(RUSTC) foo.rs
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
-include ../tools.mk
22

3-
# FIXME: ignore freebsd/windows
4-
# (windows: see `../dep-info/Makefile`)
3+
# FIXME
54
ifneq ($(shell uname),FreeBSD)
6-
ifndef IS_WINDOWS
75
all:
86
$(RUSTC) --dep-info $(TMPDIR)/custom-deps-file.d --crate-type=lib lib.rs
97
sleep 1
@@ -18,8 +16,3 @@ else
1816
all:
1917

2018
endif
21-
22-
else
23-
all:
24-
25-
endif
Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
-include ../tools.mk
22

3-
# FIXME: ignore freebsd/windows
4-
# on windows `rustc --dep-info` produces Makefile dependency with
5-
# windows native paths (e.g. `c:\path\to\libfoo.a`)
6-
# but msys make seems to fail to recognize such paths, so test fails.
73
ifneq ($(shell uname),FreeBSD)
8-
ifndef IS_WINDOWS
94
all:
105
$(RUSTC) --dep-info --crate-type=lib lib.rs
116
sleep 2
@@ -21,8 +16,3 @@ else
2116
all:
2217

2318
endif
24-
25-
else
26-
all:
27-
28-
endif

branches/try2/src/test/run-make/lto-smoke-c/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
-include ../tools.mk
22

3-
ifdef IS_WINDOWS
4-
EXTRAFLAGS :=
5-
else
63
ifeq ($(shell uname),Darwin)
74
else
85
ifeq ($(shell uname),FreeBSD)
@@ -11,7 +8,6 @@ else
118
EXTRAFLAGS := -lm -lrt -ldl -lpthread
129
endif
1310
endif
14-
endif
1511

1612
# Apparently older versions of GCC segfault if -g is passed...
1713
CC := $(CC:-g=)
Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +0,0 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
10-
11-
// FIXME #13793
12-
#[test]
13-
fn test_dummy() {
14-
}

branches/try2/src/test/run-make/obey-crate-type-flag/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# fail if an rlib was built
88
all:
99
$(RUSTC) test.rs
10-
rm $(TMPDIR)/$(call RLIB_GLOB,test)
11-
rm $(TMPDIR)/$(call DYLIB_GLOB,test)
10+
rm $(TMPDIR)/libtest*.rlib
11+
rm $(TMPDIR)/libtest*
1212
$(RUSTC) --crate-type dylib test.rs
13-
rm $(TMPDIR)/$(call RLIB_GLOB,test) && exit 1 || exit 0
13+
rm $(TMPDIR)/libtest*.rlib && exit 1 || exit 0

branches/try2/src/test/run-make/output-type-permutations/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ all:
66
rm $(TMPDIR)/$(call DYLIB_GLOB,bar)
77
rm $(TMPDIR)/$(call STATICLIB_GLOB,bar)
88
$(RUSTC) foo.rs --crate-type=bin
9-
rm $(TMPDIR)/$(call BIN,bar)
9+
rm $(TMPDIR)/bar
1010
$(RUSTC) foo.rs --emit=asm,ir,bc,obj,link
1111
rm $(TMPDIR)/bar.ll
1212
rm $(TMPDIR)/bar.bc
1313
rm $(TMPDIR)/bar.s
1414
rm $(TMPDIR)/bar.o
15-
rm $(TMPDIR)/$(call BIN,bar)
15+
rm $(TMPDIR)/bar
1616
$(RUSTC) foo.rs --emit=asm,ir,bc,obj,link --crate-type=staticlib
1717
rm $(TMPDIR)/bar.ll
1818
rm $(TMPDIR)/bar.s
@@ -27,15 +27,15 @@ all:
2727
$(RUSTC) foo.rs --emit=obj -o $(TMPDIR)/foo
2828
rm $(TMPDIR)/foo
2929
$(RUSTC) foo.rs --emit=link -o $(TMPDIR)/foo
30-
rm $(TMPDIR)/$(call BIN,foo)
30+
rm $(TMPDIR)/foo
3131
$(RUSTC) foo.rs --crate-type=rlib -o $(TMPDIR)/foo
3232
rm $(TMPDIR)/foo
3333
$(RUSTC) foo.rs --crate-type=dylib -o $(TMPDIR)/foo
34-
rm $(TMPDIR)/$(call BIN,foo) # FIXME 13794
34+
rm $(TMPDIR)/foo
3535
$(RUSTC) foo.rs --crate-type=staticlib -o $(TMPDIR)/foo
3636
rm $(TMPDIR)/foo
3737
$(RUSTC) foo.rs --crate-type=bin -o $(TMPDIR)/foo
38-
rm $(TMPDIR)/$(call BIN,foo)
38+
rm $(TMPDIR)/foo
3939
mv $(TMPDIR)/bar.bc $(TMPDIR)/foo.bc
4040
$(RUSTC) foo.rs --emit=bc,link --crate-type=rlib
4141
cmp $(TMPDIR)/foo.bc $(TMPDIR)/bar.bc
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
-include ../tools.mk
2-
ifdef IS_WINDOWS
3-
# ignore windows
4-
RUSTC_FLAGS =
5-
else
62
# Notice the space in the end, this emulates the output of pkg-config
73
RUSTC_FLAGS = -C link-args="-lc "
8-
endif
94

105
all:
116
$(RUSTC) $(RUSTC_FLAGS) empty.rs
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
-include ../tools.mk
22

3-
# FIXME ignore windows
4-
ifndef IS_WINDOWS
5-
63
all:
74
$(RUSTDOC) --test foo.rs
85
$(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs
96
cp verify.sh $(TMPDIR)
107
$(call RUN,verify.sh) $(TMPDIR)
11-
12-
else
13-
all:
14-
15-
endif
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
-include ../tools.mk
22

3-
# ignore windows: `ln` is actually `cp` on msys.
4-
ifndef IS_WINDOWS
5-
63
all:
74
$(RUSTC) foo.rs
85
mkdir -p $(TMPDIR)/other
96
ln -nsf $(TMPDIR)/$(call DYLIB_GLOB,foo) $(TMPDIR)/other
107
$(RUSTC) bar.rs -L $(TMPDIR)/other
11-
12-
else
13-
all:
14-
15-
endif

branches/try2/src/test/run-make/tools.mk

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,21 @@ FAILS = $(TMPDIR)/$(1) && exit 1 || exit 0
1010
RLIB_GLOB = lib$(1)*.rlib
1111
STATICLIB = $(TMPDIR)/lib$(1).a
1212
STATICLIB_GLOB = lib$(1)*.a
13-
BIN = $(1)
1413

15-
UNAME = $(shell uname)
16-
ifneq (,$(findstring MINGW,$(UNAME)))
17-
IS_WINDOWS=1
18-
endif
19-
20-
ifeq ($(UNAME),Darwin)
14+
ifeq ($(shell uname),Darwin)
2115
DYLIB_GLOB = lib$(1)*.dylib
2216
DYLIB = $(TMPDIR)/lib$(1).dylib
2317
else
24-
ifdef IS_WINDOWS
25-
DYLIB_GLOB = $(1)*.dll
26-
DYLIB = $(TMPDIR)/$(1).dll
27-
BIN = $(1).exe
28-
export PATH := $(PATH):$(LD_LIBRARY_PATH)
29-
else
3018
DYLIB_GLOB = lib$(1)*.so
3119
DYLIB = $(TMPDIR)/lib$(1).so
3220
endif
33-
endif
3421

3522
%.a: %.o
3623
ar crus $@ $<
3724
%.dylib: %.o
3825
$(CC) -dynamiclib -Wl,-dylib -o $@ $<
3926
%.so: %.o
4027
$(CC) -o $@ $< -shared
41-
%.dll: lib%.o
42-
$(CC) -o $@ $< -shared
43-
4428
$(TMPDIR)/lib%.o: %.c
4529
$(CC) -c -o $@ $<
4630

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
-include ../tools.mk
22

3-
# FIXME ignore windows
4-
ifndef IS_WINDOWS
5-
63
all:
74
# check that we don't ICE on unicode input, issue #11178
85
$(RUSTC) multiple_files.rs
@@ -12,8 +9,3 @@ all:
129
# correct length. issue #8706
1310
$(RUSTC) span_length.rs
1411
$(call RUN,span_length) "$(RUSTC)" "$(TMPDIR)"
15-
16-
else
17-
all:
18-
19-
endif

branches/try2/src/test/run-make/weird-output-filenames/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ all:
66
$(RUSTC) foo.rs -o $(TMPDIR)/.foo.bar
77
rm $(TMPDIR)/.foo.bar
88
$(RUSTC) foo.rs -o $(TMPDIR)/+foo+bar
9-
rm $(TMPDIR)/$(call BIN,+foo+bar)
9+
rm $(TMPDIR)/+foo+bar
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::ascii::StrAsciiExt;
12+
13+
static NAME: &'static str = "hello world";
14+
15+
fn main() {
16+
match NAME.to_ascii_lower().as_slice() {
17+
"foo" => {}
18+
_ => {}
19+
}
20+
}

0 commit comments

Comments
 (0)