Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC Commits: 264060a2 by Matthew Pickering at 2025-12-31T17:10:07+01:00 ci: Javascript don't set CROSS_EMULATOR There is no CROSS_EMULATOR needed to run javascript binaries, so we don't set the CROSS_EMULATOR to some dummy value. - - - - - 3433717e by Sven Tennie at 2025-12-31T17:10:07+01:00 Javascript skip T23697 See #22355 about how HSC2HS and the Javascript target don't play well together. - - - - - 2fd4bf52 by Sven Tennie at 2025-12-31T17:10:07+01:00 testsuite: Stabilize T24602 I don't get *why*, however the final js file seems to be written asynchronuously. So, we wait until it's around. - - - - - 4 changed files: - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - libraries/base/tests/all.T - testsuite/tests/javascript/closure/Makefile Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -139,9 +139,11 @@ bignumString :: BignumBackend -> String bignumString Gmp = "gmp" bignumString Native = "native" +data TimeoutIncrease = TimeoutIncrease | NoTimeoutIncrease + data CrossEmulator = NoEmulator - | NoEmulatorNeeded + | NoEmulatorNeeded TimeoutIncrease | Emulator String -- | A BuildConfig records all the options which can be modified to affect the @@ -889,16 +891,20 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} } NoEmulator -- we need an emulator but it isn't set. Won't run the testsuite | Just _ <- crossTarget buildConfig - -> "CROSS_EMULATOR" =: "NOT_SET" - | otherwise -> mempty - Emulator s -> "CROSS_EMULATOR" =: s - NoEmulatorNeeded -> mempty + -> "CROSS_EMULATOR" =: "NOT_SET" + | otherwise -> mempty + Emulator s -> "CROSS_EMULATOR" =: s + NoEmulatorNeeded _ -> mempty , if withNuma buildConfig then "ENABLE_NUMA" =: "1" else mempty - , let testTimeoutArg = + , let + -- Emulators are naturally slower than native machines. + -- Triple the default of 300. + timeoutConf = "-e config.timeout=900" + testTimeoutArg = case crossEmulator buildConfig of - -- Emulators are naturally slower than native machines. - -- Triple the default of 300. - Emulator _ -> "-e config.timeout=900" :: String + Emulator _ -> timeoutConf + -- NodeJS (Javascript) is slower than native code + NoEmulatorNeeded TimeoutIncrease -> timeoutConf _ -> mempty runtestArgs = testTimeoutArg : @@ -1309,7 +1315,7 @@ cross_jobs = [ (validateBuilds AArch64 (Linux Debian12Wine) (winAarch64Config {llvmBootstrap = True})) ] where - javascriptConfig = (crossConfig "javascript-unknown-ghcjs" (Emulator "js-emulator") (Just "emconfigure")) + javascriptConfig = (crossConfig "javascript-unknown-ghcjs" (NoEmulatorNeeded TimeoutIncrease) (Just "emconfigure")) { bignumBackend = Native } makeWinArmJobs = modifyJobs @@ -1354,7 +1360,7 @@ cross_jobs = [ $ addValidateRule WasmBackend $ validateBuilds Amd64 (Linux AlpineWasm) cfg wasm_build_config = - (crossConfig "wasm32-wasi" NoEmulatorNeeded Nothing) + (crossConfig "wasm32-wasi" (NoEmulatorNeeded NoTimeoutIncrease) Nothing) { hostFullyStatic = True , buildFlavour = Release -- TODO: This needs to be validate but wasm backend doesn't pass yet , textWithSIMDUTF = True ===================================== .gitlab/jobs.yaml ===================================== @@ -2118,7 +2118,6 @@ "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check", "CONFIGURE_WRAPPER": "emconfigure", - "CROSS_EMULATOR": "js-emulator", "CROSS_STAGE": "2", "CROSS_TARGET": "javascript-unknown-ghcjs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", @@ -6292,7 +6291,6 @@ "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check", "CONFIGURE_WRAPPER": "emconfigure", - "CROSS_EMULATOR": "js-emulator", "CROSS_STAGE": "2", "CROSS_TARGET": "javascript-unknown-ghcjs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", ===================================== libraries/base/tests/all.T ===================================== @@ -318,6 +318,7 @@ test('T23687', normal, compile_and_run, ['']) test('T23697', [ when(opsys('mingw32'), skip) # header not found , when(opsys('darwin'), skip) # permission denied + , js_broken(22355) ], makefile_test, ['T23697']) test('stimesEndo', normal, compile_and_run, ['']) test('T24807', exit_code(1), compile_and_run, ['']) ===================================== testsuite/tests/javascript/closure/Makefile ===================================== @@ -13,4 +13,10 @@ T24602: --emit_use_strict \ --js_output_file ./T24602.jsexe/all.min.js \ ./T24602.jsexe/all.js ./T24602.jsexe/all.externs.js + # For odd reasons, the final js file might not be finally written at this + # line. This happens when tests run concurrently (e.g. on CI). + while [ ! -f "./T24602.jsexe/all.min.js" ]; do \ + sync \ + sleep 1; \ + done node ./T24602.jsexe/all.min.js View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2b84ec2875431f7fc4b7ac4a8ef8c58... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2b84ec2875431f7fc4b7ac4a8ef8c58... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)