Skip to content
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

Riscv64linux Test fixes #80839

Merged
merged 7 commits into from
Mar 29, 2021
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
16 changes: 15 additions & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,21 @@ impl Step for Linkcheck {

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
let builder = run.builder;
run.path("src/tools/linkchecker").default_condition(builder.config.docs)
let run = run.path("src/tools/linkchecker");
let hosts = &builder.hosts;
let targets = &builder.targets;

// if we have different hosts and targets, some things may be built for
// the host (e.g. rustc) and others for the target (e.g. std). The
// documentation built for each will contain broken links to
// docs built for the other platform (e.g. rustc linking to cargo)
if (hosts != targets) && !hosts.is_empty() && !targets.is_empty() {
panic!(
"Linkcheck currently does not support builds with different hosts and targets.
You can skip linkcheck with --exclude src/tools/linkchecker"
);
}
Mark-Simulacrum marked this conversation as resolved.
Show resolved Hide resolved
run.default_condition(builder.config.docs)
}

fn make_run(run: RunConfig<'_>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV RUST_CONFIGURE_ARGS --qemu-riscv64-rootfs=/tmp/rootfs
ENV SCRIPT python3 ../x.py --stage 2 test --target riscv64gc-unknown-linux-gnu
ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target riscv64gc-unknown-linux-gnu

ENV NO_CHANGE_USER=1
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-llvm-10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ ENV SCRIPT python2.7 ../x.py --stage 2 test --exclude src/tools/tidy && \
# This is intended to make sure that both `--pass=check` continues to
# work.
#
python2.7 ../x.py --stage 2 test src/test/ui --pass=check --target=i686-unknown-linux-gnu && \
python2.7 ../x.py --stage 2 test src/test/ui --pass=check \
--host='' --target=i686-unknown-linux-gnu && \
# Run tidy at the very end, after all the other tests.
python2.7 ../x.py --stage 2 test src/tools/tidy
10 changes: 5 additions & 5 deletions src/test/run-make/incr-prev-body-beyond-eof/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../../run-make-fulldeps/tools.mk
# ignore-none no-std is not supported
# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for `std`

# FIXME https://github.com/rust-lang/rust/issues/78911
# ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64)
include ../../run-make-fulldeps/tools.mk

# Tests that we don't ICE during incremental compilation after modifying a
# function span such that its previous end line exceeds the number of lines
Expand All @@ -14,6 +14,6 @@ all:
mkdir $(SRC)
mkdir $(INCR)
cp a.rs $(SRC)/main.rs
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET)
cp b.rs $(SRC)/main.rs
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs
$(RUSTC) -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET)
15 changes: 11 additions & 4 deletions src/test/run-make/issue-36710/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
include ../../run-make-fulldeps/tools.mk
# ignore-riscv64 $(call RUN,foo) expects to run the target executable natively
# so it won't work with remote-test-server
# ignore-arm Another build using remote-test-server
# ignore-none no-std is not supported
# ignore-wasm32 FIXME: don't attempt to compile C++ to WASM
# ignore-wasm64 FIXME: don't attempt to compile C++ to WASM
# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for `std`
# ignore-musl FIXME: this makefile needs teaching how to use a musl toolchain
# (see dist-i586-gnu-i586-i686-musl Dockerfile)

# FIXME https://github.com/rust-lang/rust/issues/78911
# ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64)
include ../../run-make-fulldeps/tools.mk

all: foo
$(call RUN,foo)

foo: foo.rs $(call NATIVE_STATICLIB,foo)
$(RUSTC) $< -lfoo $(EXTRARSCXXFLAGS)
$(RUSTC) $< -lfoo $(EXTRARSCXXFLAGS) --target $(TARGET)

$(TMPDIR)/libfoo.o: foo.cpp
$(call COMPILE_OBJ_CXX,$@,$<)
8 changes: 4 additions & 4 deletions src/test/run-make/issue-83112-incr-test-moved-file/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include ../../run-make-fulldeps/tools.mk

# FIXME https://github.com/rust-lang/rust/issues/78911
# ignore-32bit wrong/no cross compiler and sometimes we pass wrong gcc args (-m64)
# ignore-none no-std is not supported
# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for 'std'

# Regression test for issue #83112
# The generated test harness code contains spans with a dummy location,
Expand All @@ -20,6 +20,6 @@ all:
mkdir $(SRC)/mydir
mkdir $(INCR)
cp main.rs $(SRC)/main.rs
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/main.rs
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/main.rs --target $(TARGET)
mv $(SRC)/main.rs $(SRC)/mydir/main.rs
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/mydir/main.rs
$(RUSTC) --test -C incremental=$(INCR) $(SRC)/mydir/main.rs --target $(TARGET)