Skip to content

fixing tests to get Bitrig build fully completing #23976

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 1 commit into from
Apr 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {

// write debugger script
let mut script_str = String::with_capacity(2048);
script_str.push_str("set charset UTF-8\n");
let charset = if cfg!(target_os = "bitrig") { "auto" } else { "UTF-8" };
script_str.push_str(&format!("set charset {}\n", charset));
script_str.push_str(&format!("file {}\n", exe_file.to_str().unwrap()));
script_str.push_str("target remote :5039\n");
script_str.push_str(&format!("set solib-search-path \
Expand Down Expand Up @@ -516,8 +517,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
.to_string();
// write debugger script
let mut script_str = String::with_capacity(2048);

script_str.push_str("set charset UTF-8\n");
let charset = if cfg!(target_os = "bitrig") { "auto" } else { "UTF-8" };
script_str.push_str(&format!("set charset {}\n", charset));
script_str.push_str("show version\n");

match config.gdb_version {
Expand Down
3 changes: 2 additions & 1 deletion src/libstd/sys/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ mod tests {
use prelude::v1::*;

#[cfg_attr(any(target_os = "freebsd",
target_os = "openbsd"),
target_os = "openbsd",
target_os = "bitrig"),
ignore)]
// under some system, pipe(2) will return a bidrectionnal pipe
#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// older versions of GDB too. A more extensive test can be found in
// gdb-pretty-struct-and-enums.rs

// ignore-bitrig
// ignore-windows failing on win32 bot
// ignore-freebsd: gdb package too new
// ignore-tidy-linelength
Expand Down
1 change: 1 addition & 0 deletions src/test/parse-fail/issue-5806.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// ignore-windows
// ignore-freebsd
// ignore-openbsd
// ignore-bitrig

#[path = "../compile-fail"]
mod foo; //~ ERROR: a directory
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-make/c-link-to-rust-staticlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif
ifneq ($(shell uname),FreeBSD)
all:
$(RUSTC) foo.rs
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRAFLAGS) -lstdc++
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRAFLAGS) $(EXTRACXXFLAGS)
$(call RUN,bar)
rm $(call STATICLIB,foo*)
$(call RUN,bar)
Expand Down
4 changes: 4 additions & 0 deletions src/test/run-make/issue-14500/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# is compiled with LTO, it shouldn't strip the symbol from `foo`, and that's the
# only way that `foo.c` will successfully compile.

ifeq ($(UNAME),Bitrig)
EXTRACFLAGS := -lc $(EXTRACFLAGS) $(EXTRACXXFLAGS)
endif

all:
$(RUSTC) foo.rs --crate-type=rlib
$(RUSTC) bar.rs --crate-type=staticlib -C lto -L. -o $(TMPDIR)/libbar.a
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-make/lto-smoke-c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ CC := $(CC:-g=)

all:
$(RUSTC) foo.rs -C lto
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRACFLAGS) -lstdc++
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRACFLAGS) $(EXTRACXXFLAGS)
$(call RUN,bar)
9 changes: 7 additions & 2 deletions src/test/run-make/no-stack-check/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
-include ../tools.mk


ifndef IS_WINDOWS
ifneq ($(UNAME),OpenBSD)

SKIP_OS := 'OpenBSD Bitrig'
ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS)))

all:
$(RUSTC) -O --emit asm attr.rs
! grep -q morestack $(TMPDIR)/attr.s
Expand All @@ -10,9 +14,10 @@ all:
$(RUSTC) -O --emit asm -C no-stack-check flag.rs
! grep -q morestack $(TMPDIR)/flag.s
else
# On OpenBSD, morestack isn't used as the segmented stacks are disabled
# On Bitrig/OpenBSD, morestack isn't used as the segmented stacks are disabled
all:
endif

else
# On Windows we use __chkstk and it only appears in functions with large allocations,
# so this test wouldn't be reliable.
Expand Down
12 changes: 9 additions & 3 deletions src/test/run-make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,21 @@ endif
ifdef IS_WINDOWS
EXTRACFLAGS := -lws2_32 -luserenv
else
ifeq ($(shell uname),Darwin)
ifeq ($(UNAME),Darwin)
else
ifeq ($(shell uname),FreeBSD)
ifeq ($(UNAME),FreeBSD)
EXTRACFLAGS := -lm -lpthread -lgcc_s
else
ifeq ($(shell uname),OpenBSD)
ifeq ($(UNAME),Bitrig)
EXTRACFLAGS := -lm -lpthread
EXTRACXXFLAGS := -lc++ -lc++abi
else
ifeq ($(UNAME),OpenBSD)
EXTRACFLAGS := -lm -lpthread
else
EXTRACFLAGS := -lm -lrt -ldl -lpthread
EXTRACXXFLAGS := -lstdc++
endif
endif
endif
endif
Expand Down
7 changes: 5 additions & 2 deletions src/test/run-make/use-extern-for-plugins/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-include ../tools.mk

ifneq ($(findstring BSD,$(UNAME)),BSD)
SKIP_OS := 'FreeBSD OpenBSD Bitrig'

ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS)))

HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
ifeq ($(findstring i686,$(HOST)),i686)
TARGET := $(subst i686,x86_64,$(HOST))
Expand All @@ -13,6 +16,6 @@ all:
$(RUSTC) bar.rs -C extra-filename=-targ --target $(TARGET)
$(RUSTC) baz.rs --extern a=$(TMPDIR)/liba-targ.rlib --target $(TARGET)
else
# FreeBSD & OpenBSD support only x86_64 architecture for now
# FreeBSD, OpenBSD, and Bitrig support only x86_64 architecture for now
all:
endif
1 change: 1 addition & 0 deletions src/test/run-pass/sepcomp-cci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-bitrig
// compile-flags: -C codegen-units=3
// aux-build:sepcomp_cci_lib.rs

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/sepcomp-extern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-bitrig
// compile-flags: -C codegen-units=3
// aux-build:sepcomp-extern-lib.rs

Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/sepcomp-fns-backwards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-bitrig
// compile-flags: -C codegen-units=3

// Test references to items that haven't been translated yet.
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/sepcomp-fns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-bitrig
// compile-flags: -C codegen-units=3

// Test basic separate compilation functionality. The functions should be able
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/sepcomp-statics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-bitrig
// compile-flags: -C codegen-units=3

// Test references to static items across compilation units.
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/sepcomp-unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-bitrig
// compile-flags: -C codegen-units=3

// Test unwinding through multiple compilation units.
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/tcp-stress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// ignore-linux see joyent/libuv#1189
// ignore-android needs extra network permissions
// ignore-openbsd system ulimit (Too many open files)
// ignore-bitrig system ulimit (Too many open files)
// exec-env:RUST_LOG=debug

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