diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 668c949d1a..35d76e677c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,19 +36,16 @@ test:linux: script: - make test -#TODO: fix redoxer exec hangs -# test:redox: -# stage: test -# needs: -# - build:redox -# dependencies: -# - build:redox -# variables: -# TARGET: x86_64-unknown-redox -# script: -# - ./redoxer.sh test -# # TODO: Out of memory -# allow_failure: true +test:redox: + stage: test + needs: + - build:redox + dependencies: + - build:redox + variables: + TARGET: x86_64-unknown-redox + script: + - ./redoxer.sh test SKIP_REDOX=1 fmt: stage: test diff --git a/src/header/fcntl/linux.rs b/src/header/fcntl/linux.rs index b1e3d42aff..39c9233293 100644 --- a/src/header/fcntl/linux.rs +++ b/src/header/fcntl/linux.rs @@ -17,4 +17,4 @@ pub const O_PATH: c_int = 0x20_0000; pub const FD_CLOEXEC: c_int = 0x8_0000; // Defined for compatibility -pub const O_NDELAY: c_int = O_NONBLOCK; \ No newline at end of file +pub const O_NDELAY: c_int = O_NONBLOCK; diff --git a/src/header/fcntl/redox.rs b/src/header/fcntl/redox.rs index ba429af995..ac15f21005 100644 --- a/src/header/fcntl/redox.rs +++ b/src/header/fcntl/redox.rs @@ -26,4 +26,4 @@ pub const FD_CLOEXEC: c_int = 0x0100_0000; pub const O_NOCTTY: c_int = 0x00000200; // Defined for compatibility -pub const O_NDELAY: c_int = O_NONBLOCK; \ No newline at end of file +pub const O_NDELAY: c_int = O_NONBLOCK; diff --git a/tests/Makefile b/tests/Makefile index 89a0aa6c75..a554f2a345 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,3 +1,17 @@ +SKIP_REDOX?=0 + +# If compiling for Redox, SKIP_REDOX must be 1 +ifeq ($(SKIP_REDOX),1) +REDOX_FAILING_TESTS= +else +REDOX_FAILING_TESTS=tls \ + futimens \ + mkfifo \ + stdlib/ptsname \ + sys_mman + +endif + # Binaries that should generate the same output every time EXPECT_NAMES=\ alloca \ @@ -22,7 +36,6 @@ EXPECT_NAMES=\ fcntl/fcntl \ features \ fnmatch \ - futimens \ glob \ iso646 \ libgen \ @@ -66,7 +79,6 @@ EXPECT_NAMES=\ stdlib/div \ stdlib/env \ stdlib/mkostemps \ - stdlib/ptsname \ stdlib/qsort \ stdlib/rand \ stdlib/rand48 \ @@ -96,7 +108,6 @@ EXPECT_NAMES=\ string/stpcpy \ string/stpncpy \ strings \ - sys_mman \ sys_syslog/syslog \ time/asctime \ time/constants \ @@ -110,7 +121,6 @@ EXPECT_NAMES=\ time/time \ time/timegm \ time/tzset \ - tls \ unistd/access \ unistd/brk \ unistd/constants \ @@ -157,10 +167,10 @@ EXPECT_NAMES=\ wchar/wcswidth \ wctype/towlower \ wctype/towupper \ - mkfifo \ mknod \ mknodat \ - # TODO: Fix these + $(REDOX_FAILING_TESTS) + # TODO: Fix this # netdb/netdb \ BUILD?=. @@ -278,13 +288,19 @@ NAMES=\ EXPECT_INPUT_NAMES=\ unistd/getpass +# TODO: Dynamic linking is currently broken on Redox +# TODO: Some tests in NAMES break the kernel +ifeq ($(SKIP_REDOX),0) BINS=$(patsubst %,$(BUILD)/bins_static/%,$(NAMES)) BINS+=$(patsubst %,$(BUILD)/bins_dynamic/%,$(NAMES)) BINS+=$(patsubst %,$(BUILD)/bins_dynamic/%,$(DYNAMIC_ONLY_NAMES)) -EXPECT_BINS=$(patsubst %,$(BUILD)/bins_static/%,$(EXPECT_NAMES)) EXPECT_BINS+=$(patsubst %,$(BUILD)/bins_dynamic/%,$(EXPECT_NAMES)) EXPECT_BINS+=$(patsubst %,$(BUILD)/bins_dynamic/%,$(DYNAMIC_ONLY_NAMES)) EXPECT_INPUT_BINS=$(patsubst %,$(BUILD)/bins_expect_input/%,$(EXPECT_INPUT_NAMES)) +endif + +EXPECT_BINS=$(patsubst %,$(BUILD)/bins_static/%,$(EXPECT_NAMES)) + CARGO_TEST?=cargo TEST_RUNNER?=