Skip to content

Commit 48c5d9e

Browse files
committed
Rollup merge of rust-lang#23976 - dhuseby:bitrig_fixing_tests, r=alexcrichton
This fixes up the "make check" part of the rust build os that the Bitrig buildbot will succeed.
2 parents 32cd05b + 4cfae59 commit 48c5d9e

File tree

17 files changed

+40
-17
lines changed

17 files changed

+40
-17
lines changed

src/compiletest/runtest.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
382382

383383
// write debugger script
384384
let mut script_str = String::with_capacity(2048);
385-
script_str.push_str("set charset UTF-8\n");
385+
let charset = if cfg!(target_os = "bitrig") { "auto" } else { "UTF-8" };
386+
script_str.push_str(&format!("set charset {}\n", charset));
386387
script_str.push_str(&format!("file {}\n", exe_file.to_str().unwrap()));
387388
script_str.push_str("target remote :5039\n");
388389
script_str.push_str(&format!("set solib-search-path \
@@ -516,8 +517,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
516517
.to_string();
517518
// write debugger script
518519
let mut script_str = String::with_capacity(2048);
519-
520-
script_str.push_str("set charset UTF-8\n");
520+
let charset = if cfg!(target_os = "bitrig") { "auto" } else { "UTF-8" };
521+
script_str.push_str(&format!("set charset {}\n", charset));
521522
script_str.push_str("show version\n");
522523

523524
match config.gdb_version {

src/libstd/sys/unix/fs.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ mod tests {
381381
use prelude::v1::*;
382382

383383
#[cfg_attr(any(target_os = "freebsd",
384-
target_os = "openbsd"),
384+
target_os = "openbsd",
385+
target_os = "bitrig"),
385386
ignore)]
386387
// under some system, pipe(2) will return a bidrectionnal pipe
387388
#[test]

src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
// ignore-windows failing on win32 bot
1616
// ignore-freebsd: gdb package too new
17+
// ignore-bitrig: gdb-check:$2 = {<No data fields>}
1718
// ignore-tidy-linelength
1819
// ignore-lldb
1920
// ignore-android: FIXME(#10381)

src/test/parse-fail/issue-5806.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// ignore-windows
1212
// ignore-freebsd
1313
// ignore-openbsd
14+
// ignore-bitrig
1415

1516
#[path = "../compile-fail"]
1617
mod foo; //~ ERROR: a directory

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ endif
88
ifneq ($(shell uname),FreeBSD)
99
all:
1010
$(RUSTC) foo.rs
11-
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRAFLAGS) -lstdc++
11+
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRAFLAGS) $(EXTRACXXFLAGS)
1212
$(call RUN,bar)
1313
rm $(call STATICLIB,foo*)
1414
$(call RUN,bar)

src/test/run-make/issue-14500/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
# is compiled with LTO, it shouldn't strip the symbol from `foo`, and that's the
77
# only way that `foo.c` will successfully compile.
88

9+
ifeq ($(UNAME),Bitrig)
10+
EXTRACFLAGS := -lc $(EXTRACFLAGS) $(EXTRACXXFLAGS)
11+
endif
12+
913
all:
1014
$(RUSTC) foo.rs --crate-type=rlib
1115
$(RUSTC) bar.rs --crate-type=staticlib -C lto -L. -o $(TMPDIR)/libbar.a

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ CC := $(CC:-g=)
55

66
all:
77
$(RUSTC) foo.rs -C lto
8-
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRACFLAGS) -lstdc++
8+
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRACFLAGS) $(EXTRACXXFLAGS)
99
$(call RUN,bar)
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
-include ../tools.mk
22

3-
ifndef IS_WINDOWS
4-
ifneq ($(UNAME),OpenBSD)
3+
SKIP_OS := 'MINGW OpenBSD Bitrig'
4+
5+
ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS)))
6+
57
all:
68
$(RUSTC) -O --emit asm attr.rs
79
! grep -q morestack $(TMPDIR)/attr.s
@@ -10,11 +12,8 @@ all:
1012
$(RUSTC) -O --emit asm -C no-stack-check flag.rs
1113
! grep -q morestack $(TMPDIR)/flag.s
1214
else
13-
# On OpenBSD, morestack isn't used as the segmented stacks are disabled
14-
all:
15-
endif
16-
else
1715
# On Windows we use __chkstk and it only appears in functions with large allocations,
1816
# so this test wouldn't be reliable.
17+
# On Bitrig/OpenBSD, morestack isn't used as the segmented stacks are disabled
1918
all:
2019
endif

src/test/run-make/tools.mk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,21 @@ endif
5555
ifdef IS_WINDOWS
5656
EXTRACFLAGS := -lws2_32 -luserenv
5757
else
58-
ifeq ($(shell uname),Darwin)
58+
ifeq ($(UNAME),Darwin)
5959
else
60-
ifeq ($(shell uname),FreeBSD)
60+
ifeq ($(UNAME),FreeBSD)
6161
EXTRACFLAGS := -lm -lpthread -lgcc_s
6262
else
63-
ifeq ($(shell uname),OpenBSD)
63+
ifeq ($(UNAME),Bitrig)
64+
EXTRACFLAGS := -lm -lpthread
65+
EXTRACXXFLAGS := -lc++ -lc++abi
66+
else
67+
ifeq ($(UNAME),OpenBSD)
6468
EXTRACFLAGS := -lm -lpthread
6569
else
6670
EXTRACFLAGS := -lm -lrt -ldl -lpthread
71+
EXTRACXXFLAGS := -lstdc++
72+
endif
6773
endif
6874
endif
6975
endif

src/test/run-make/use-extern-for-plugins/Makefile

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

3-
ifneq ($(findstring BSD,$(UNAME)),BSD)
3+
SKIP_OS := 'FreeBSD OpenBSD Bitrig'
4+
5+
ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS)))
6+
47
HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
58
ifeq ($(findstring i686,$(HOST)),i686)
69
TARGET := $(subst i686,x86_64,$(HOST))
@@ -13,6 +16,6 @@ all:
1316
$(RUSTC) bar.rs -C extra-filename=-targ --target $(TARGET)
1417
$(RUSTC) baz.rs --extern a=$(TMPDIR)/liba-targ.rlib --target $(TARGET)
1518
else
16-
# FreeBSD & OpenBSD support only x86_64 architecture for now
19+
# FreeBSD, OpenBSD, and Bitrig support only x86_64 architecture for now
1720
all:
1821
endif

src/test/run-pass/sepcomp-cci.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213
// aux-build:sepcomp_cci_lib.rs
1314

src/test/run-pass/sepcomp-extern.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213
// aux-build:sepcomp-extern-lib.rs
1314

src/test/run-pass/sepcomp-fns-backwards.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test references to items that haven't been translated yet.

src/test/run-pass/sepcomp-fns.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test basic separate compilation functionality. The functions should be able

src/test/run-pass/sepcomp-statics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test references to static items across compilation units.

src/test/run-pass/sepcomp-unwind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test unwinding through multiple compilation units.

src/test/run-pass/tcp-stress.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// ignore-linux see joyent/libuv#1189
1212
// ignore-android needs extra network permissions
1313
// ignore-openbsd system ulimit (Too many open files)
14+
// ignore-bitrig system ulimit (Too many open files)
1415
// exec-env:RUST_LOG=debug
1516

1617
#![feature(rustc_private, libc, old_io, io, std_misc)]

0 commit comments

Comments
 (0)