Skip to content

Commit

Permalink
Merge NVPTX and WASM test images into test-various
Browse files Browse the repository at this point in the history
  • Loading branch information
denzp committed Jan 29, 2019
1 parent 6f86a70 commit 899d936
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
Expand Up @@ -13,14 +13,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
xz-utils

# FIXME: build the `ptx-linker` instead.
RUN curl -sL https://github.com/denzp/rust-ptx-linker/releases/download/v0.9.0-alpha.1/rust-ptx-linker.linux64.tar.gz | \
tar -xzvC /usr/bin

RUN curl -sL https://nodejs.org/dist/v9.2.0/node-v9.2.0-linux-x64.tar.xz | \
tar -xJ
tar -xJ

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV TARGETS=wasm32-unknown-unknown

ENV RUST_CONFIGURE_ARGS \
--set build.nodejs=/node-v9.2.0-linux-x64/bin/node \
--set rust.lld
Expand All @@ -31,11 +33,18 @@ ENV RUST_CONFIGURE_ARGS \
# other contexts as well
ENV NO_DEBUG_ASSERTIONS=1

ENV SCRIPT python2.7 /checkout/x.py test --target $TARGETS \
ENV WASM_TARGETS=wasm32-unknown-unknown
ENV WASM_SCRIPT python2.7 /checkout/x.py test --target $WASM_TARGETS \
src/test/run-make \
src/test/ui \
src/test/run-pass \
src/test/compile-fail \
src/test/mir-opt \
src/test/codegen-units \
src/libcore \
src/libcore

ENV NVPTX_TARGETS=nvptx64-nvidia-cuda
ENV NVPTX_SCRIPT python2.7 /checkout/x.py test --target $NVPTX_TARGETS \
src/test/run-make

ENV SCRIPT $WASM_SCRIPT && $NVPTX_SCRIPT
12 changes: 2 additions & 10 deletions src/test/run-make/nvptx-dylib-crate/kernel.rs
Expand Up @@ -12,7 +12,6 @@ extern crate dep;
// CHECK: .func (.param .b32 func_retval0) wrapping_external_fn
// CHECK: .func (.param .b32 func_retval0) panicking_external_fn
// CHECK: .func [[PANIC_HANDLER:_ZN4core9panicking5panic[a-zA-Z0-9]+]]
// CHECK: .func [[PANIC_FMT:_ZN4core9panicking9panic_fmt[a-zA-Z0-9]+]]

// CHECK-LABEL: .visible .entry top_kernel(
#[no_mangle]
Expand Down Expand Up @@ -47,15 +46,8 @@ pub unsafe extern "ptx-kernel" fn top_kernel(a: *const u32, b: *mut u32) {
// CHECK: [[PANIC_HANDLER]]
// CHECK: }

// Verify whether panic handler is present.
// CHECK: .func [[PANIC_HANDLER]]()
// CHECK: {
// CHECK: call.uni
// CHECK: [[PANIC_FMT]]
// CHECK: }

// And finally, check the dummy panic formatter.
// CHECK: .func [[PANIC_FMT]]()
// Verify whether out dummy panic formatter has a correct body.
// CHECK: .func [[PANIC_FMT:_ZN4core9panicking9panic_fmt[a-zA-Z0-9]+]]()
// CHECK: {
// CHECK: trap;
// CHECK: }
Expand Down

0 comments on commit 899d936

Please sign in to comment.