]> git.lizzy.rs Git - rust.git/commitdiff
fixing some tests and temporarily disabling others to get Bitrig build working 100%
authorDave Huseby <dhuseby@mozilla.com>
Mon, 23 Mar 2015 19:48:42 +0000 (12:48 -0700)
committerDave Huseby <dhuseby@mozilla.com>
Sat, 4 Apr 2015 19:33:44 +0000 (12:33 -0700)
17 files changed:
src/compiletest/runtest.rs
src/libstd/sys/unix/fs.rs
src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
src/test/parse-fail/issue-5806.rs
src/test/run-make/c-link-to-rust-staticlib/Makefile
src/test/run-make/issue-14500/Makefile
src/test/run-make/lto-smoke-c/Makefile
src/test/run-make/no-stack-check/Makefile
src/test/run-make/tools.mk
src/test/run-make/use-extern-for-plugins/Makefile
src/test/run-pass/sepcomp-cci.rs
src/test/run-pass/sepcomp-extern.rs
src/test/run-pass/sepcomp-fns-backwards.rs
src/test/run-pass/sepcomp-fns.rs
src/test/run-pass/sepcomp-statics.rs
src/test/run-pass/sepcomp-unwind.rs
src/test/run-pass/tcp-stress.rs

index 23267c3e93472cb0b4f3faf59fd675594635e13d..d99f06bd853b71d0f6bf8e025abdf89b97906f2e 100644 (file)
@@ -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 \
@@ -516,8 +517,8 @@ fn sleep() {
                                                        .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 {
index 6b085c8eb7a85fc90b41b2239c4410e29118c5f4..6121105f10b956c4cefb6ce859e9753726ee85ad 100644 (file)
@@ -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]
index aa6051d79224585469ae51fd5207f59852fef156..0d8b42a9f767214c19871ef683ca0e5143002a5a 100644 (file)
@@ -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
index 09de97d71b83e25b76a634c799818d51cc24b27f..5d2908b92ef3ee1d98077e346bf83554dda9fbae 100644 (file)
@@ -11,6 +11,7 @@
 // ignore-windows
 // ignore-freebsd
 // ignore-openbsd
+// ignore-bitrig
 
 #[path = "../compile-fail"]
 mod foo; //~ ERROR: a directory
index 477b85f362a29876e72d08d651dbdb44e3a6817d..56c09b895f1417005d324c4e326f2f8cdcec3bdc 100644 (file)
@@ -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)
index c19d3d5c30f1473a41d571e54edea4a4404805ce..6ea3cf48ffbbd41d2d3179b81a3cb81eecbde1d2 100644 (file)
@@ -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
index c678a3c472b1b0ab82d69d40b2866599083e1683..6165afbeb222f56ddf1c9d9f79fd429a324a441c 100644 (file)
@@ -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)
index 5fce35e2beb87774e7c2218145b923cb4e755d94..a2e1fe5627186f3b42d4f6ec0e3389139ece0143 100644 (file)
@@ -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
@@ -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.
index 7b604bedfd00bfe6e459b286ed4a5a626553c751..223296286bd89aeb81b7717938766074bdce784f 100644 (file)
@@ -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
index f8abc5019b4fd87f98de63a10fa8d19d8a7e503f..c67bd3d82ef6be609be7a5f1e14fff085aca69bb 100644 (file)
@@ -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))
@@ -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
index 6a92f32c0b314c29b08db88bebd2b5aa4e3c2cae..a4d74dbd55ae1d2b8824c4e11556a8ceeee580ec 100644 (file)
@@ -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
 
index f91c3d1ff3775c9cdeebdd9a712a0c87ce36b492..3ec27466f4ced11821ba56b52a50d616e1330ae8 100644 (file)
@@ -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
 
index 2e510082e2773e54f902dfbd4e18afe0347c7d5a..cd101bb20642fac65e44d40f833788a834c9bc4f 100644 (file)
@@ -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.
index f4fa0ed56981284af8c552f55cd56e088474ee30..b76c24bfc18b55ee6633e87d5d6f34401f010a05 100644 (file)
@@ -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
index e926114e21924c0b6b1b04e60e06f8cd3cb30054..f10f25a58bf7ee1a9bf76df6e5a89a0df13f74b2 100644 (file)
@@ -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.
index 71d3d91e84fde89f2c9cd6ee20d50d3c6e12b8bf..9663679d09a7eeea28a4d2168845e71e5fdecfa1 100644 (file)
@@ -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.
index 4209d5986ba506c8fc3d1a69180273bfa94ca4c5..f6952ad64f1f3ed0ab35dcca246fadc07650a346 100644 (file)
@@ -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)]