diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index 2d388f325d040732f61424c089c19346d9ae4dc7..6d8a6f31c230e42ec0765cb7269660f0c8e958ef 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -608,16 +608,17 @@ function test_hadrian() { if [[ "${CROSS_EMULATOR:-}" == "NOT_SET" ]]; then info "Cannot test cross-compiled build without CROSS_EMULATOR being set." return + elif [[ -n "${CROSS_TARGET:-}" ]] && [[ "${CROSS_TARGET:-}" == *"wasm"* ]]; then + run_hadrian \ + test \ + --summary-junit=./junit.xml \ + "runtest.opts+=${RUNTEST_ARGS:-}" || fail "hadrian main testsuite targetting $CROSS_TARGET" elif [ -n "${CROSS_TARGET:-}" ]; then local instdir="$TOP/_build/install" local test_compiler="$instdir/bin/${cross_prefix}ghc$exe" install_bindist _build/bindist/ghc-*/ "$instdir" echo 'main = putStrLn "hello world"' > expected run "$test_compiler" -package ghc "$TOP/.gitlab/hello.hs" -o hello - # Despite "-o hello", ghc may output something like hello.exe or - # hello.wasm depending on the backend. For the time being let's - # just move it to hello before proceeding to running it. - mv hello.wasm hello || true ${CROSS_EMULATOR:-} ./hello > actual run diff expected actual elif [[ -n "${REINSTALL_GHC:-}" ]]; then