[Git][ghc/ghc][master] CI: JavaScript backend runs testsuite
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Thu Feb 2 05:16:33 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
394b91ce by doyougnu at 2023-02-02T00:16:10-05:00
CI: JavaScript backend runs testsuite
This MR runs the testsuite for the JS backend. Note that this is a
temporary solution until !9515 is merged.
Key point: The CI runs hadrian on the built cross compiler _but not_ on
the bindist.
Other Highlights:
- stm submodule gets a bump to mark tests as broken
- several tests are marked as broken or are fixed by adding more
- conditions to their test runner instance.
List of working commit messages:
CI: test cross target _and_ emulator
CI: JS: Try run testsuite with hadrian
JS.CI: cleanup and simplify hadrian invocation
use single bracket, print info
JS CI: remove call to test_compiler from hadrian
don't build haddock
JS: mark more tests as broken
Tracked in https://gitlab.haskell.org/ghc/ghc/-/issues/22576
JS testsuite: don't skip sum_mod test
Its expected to fail, yet we skipped it which automatically makes it
succeed leading to an unexpected success,
JS testsuite: don't mark T12035j as skip
leads to an unexpected pass
JS testsuite: remove broken on T14075
leads to unexpected pass
JS testsuite: mark more tests as broken
JS testsuite: mark T11760 in base as broken
JS testsuite: mark ManyUnbSums broken
submodules: bump process and hpc for JS tests
Both submodules has needed tests skipped or marked broken for th JS
backend. This commit now adds these changes to GHC.
See:
HPC: https://gitlab.haskell.org/hpc/hpc/-/merge_requests/21
Process: https://github.com/haskell/process/pull/268
remove js_broken on now passing tests
separate wasm and js backend ci
test: T11760: add threaded, non-moving only_ways
test: T10296a add req_c
T13894: skip for JS backend
tests: jspace, T22333: mark as js_broken(22573)
test: T22513i mark as req_th
stm submodule: mark stm055, T16707 broken for JS
tests: js_broken(22374) on unpack_sums_6, T12010
dont run diff on JS CI, cleanup
fixup: More CI cleanup
fix: align text to master
fix: align exceptions submodule to master
CI: Bump DOCKER_REV
Bump to ci-images commit that has a deb11 build with node. Required for
!9552
testsuite: mark T22669 as js_skip
See #22669
This test tests that .o-boot files aren't created when run in using the
interpreter backend. Thus this is not relevant for the JS backend.
testsuite: mark T22671 as broken on JS
See #22835
base.testsuite: mark Chan002 fragile for JS
see #22836
revert: submodule process bump
bump stm submodule
New hash includes skips for the JS backend.
testsuite: mark RnPatternSynonymFail broken on JS
Requires TH:
- see !9779
- and #22261
compiler: GHC.hs ifdef import Utils.Panic.Plain
- - - - -
30 changed files:
- .gitlab/ci.sh
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC.hs
- libraries/base/tests/Concurrent/all.T
- libraries/base/tests/IO/T12010/test.T
- libraries/base/tests/all.T
- libraries/hpc
- libraries/stm
- testsuite/tests/ado/all.T
- testsuite/tests/cabal/t22333/all.T
- testsuite/tests/driver/T14075/all.T
- testsuite/tests/driver/all.T
- testsuite/tests/driver/fat-iface/T22405/all.T
- testsuite/tests/driver/j-space/all.T
- testsuite/tests/driver/t22391/all.T
- testsuite/tests/lib/integer/all.T
- testsuite/tests/numeric/should_run/all.T
- testsuite/tests/perf/compiler/all.T
- testsuite/tests/rename/should_compile/all.T
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/rep-poly/all.T
- testsuite/tests/rts/all.T
- testsuite/tests/simplCore/should_compile/all.T
- testsuite/tests/stranal/should_run/all.T
- testsuite/tests/type-data/should_compile/all.T
- testsuite/tests/typecheck/should_fail/all.T
- testsuite/tests/typecheck/should_run/all.T
- testsuite/tests/unboxedsums/all.T
- testsuite/tests/unboxedsums/module/all.T
Changes:
=====================================
.gitlab/ci.sh
=====================================
@@ -601,6 +601,16 @@ function test_hadrian() {
if [[ "${CROSS_EMULATOR:-}" == "NOT_SET" ]]; then
info "Cannot test cross-compiled build without CROSS_EMULATOR being set."
return
+ # special case for JS backend
+ elif [ -n "${CROSS_TARGET:-}" ] && [ "${CROSS_EMULATOR:-}" == "js-emulator" ]; then
+ # run "hadrian test" directly, not using the bindist, even though it did get installed.
+ # This is a temporary solution, See !9515 for the status of hadrian support.
+ run_hadrian \
+ test \
+ --summary-junit=./junit.xml \
+ --test-have-intree-files \
+ --docs=none \
+ "runtest.opts+=${RUNTEST_ARGS:-}" || fail "cross-compiled hadrian main testsuite"
elif [ -n "${CROSS_TARGET:-}" ]; then
local instdir="$TOP/_build/install"
local test_compiler="$instdir/bin/${cross_prefix}ghc$exe"
=====================================
.gitlab/gen_ci.hs
=====================================
@@ -882,7 +882,7 @@ job_groups =
, standardBuildsWithConfig Amd64 (Linux Alpine) (splitSectionsBroken static)
, disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine) staticNativeInt))
, validateBuilds Amd64 (Linux Debian11) (crossConfig "aarch64-linux-gnu" (Emulator "qemu-aarch64 -L /usr/aarch64-linux-gnu") Nothing)
- , validateBuilds Amd64 (Linux Debian11) (crossConfig "js-unknown-ghcjs" NoEmulatorNeeded (Just "emconfigure")
+ , validateBuilds Amd64 (Linux Debian11) (crossConfig "js-unknown-ghcjs" (Emulator "js-emulator") (Just "emconfigure")
)
{ bignumBackend = Native
}
=====================================
.gitlab/jobs.yaml
=====================================
@@ -1505,6 +1505,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp",
"CONFIGURE_WRAPPER": "emconfigure",
+ "CROSS_EMULATOR": "js-emulator",
"CROSS_TARGET": "js-unknown-ghcjs",
"TEST_ENV": "x86_64-linux-deb11-int_native-cross_js-unknown-ghcjs-validate",
"XZ_OPT": "-9"
@@ -4048,6 +4049,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp",
"CONFIGURE_WRAPPER": "emconfigure",
+ "CROSS_EMULATOR": "js-emulator",
"CROSS_TARGET": "js-unknown-ghcjs",
"TEST_ENV": "x86_64-linux-deb11-int_native-cross_js-unknown-ghcjs-validate"
}
=====================================
compiler/GHC.hs
=====================================
@@ -357,7 +357,9 @@ import GHC.Utils.Monad
import GHC.Utils.Misc
import GHC.Utils.Outputable
import GHC.Utils.Panic
+#if !defined(js_HOST_ARCH)
import GHC.Utils.Panic.Plain
+#endif
import GHC.Utils.Logger
import GHC.Utils.Fingerprint
@@ -558,13 +560,13 @@ withCleanupSession ghc = ghc `MC.finally` cleanup
initGhcMonad :: GhcMonad m => Maybe FilePath -> m ()
initGhcMonad mb_top_dir = setSession =<< liftIO ( do
+#if !defined(js_HOST_ARCH)
-- The call to c_keepCAFsForGHCi must not be optimized away. Even in non-debug builds.
-- So we can't use assertM here.
-- See Note [keepCAFsForGHCi] in keepCAFsForGHCi.c for details about why.
--- #if MIN_VERSION_GLASGOW_HASKELL(9,7,0,0)
!keep_cafs <- c_keepCAFsForGHCi
massert keep_cafs
--- #endif
+#endif
initHscEnv mb_top_dir
)
@@ -1959,7 +1961,8 @@ instance Exception GhcApiError
mkApiErr :: DynFlags -> SDoc -> GhcApiError
mkApiErr dflags msg = GhcApiError (showSDoc dflags msg)
---
+
+#if !defined(js_HOST_ARCH)
foreign import ccall unsafe "keepCAFsForGHCi"
c_keepCAFsForGHCi :: IO Bool
-
+#endif
=====================================
libraries/base/tests/Concurrent/all.T
=====================================
@@ -1,3 +1,3 @@
-test('Chan002', extra_run_opts('100'), compile_and_run, [''])
+test('Chan002', [extra_run_opts('100'), fragile(22836)], compile_and_run, [''])
test('Chan003', extra_run_opts('200'), compile_and_run, [''])
test('ThreadDelay001', js_broken(22374), compile_and_run, [''])
=====================================
libraries/base/tests/IO/T12010/test.T
=====================================
@@ -3,5 +3,6 @@ test('T12010',
only_ways(['threaded1']),
extra_ways(['threaded1']),
when(wordsize(32), fragile(16572)),
+ js_broken(22374),
cmd_prefix('WAY_FLAGS="' + ' '.join(config.way_flags['threaded1']) + '"')],
makefile_test, [])
=====================================
libraries/base/tests/all.T
=====================================
@@ -240,7 +240,10 @@ test('T11555', normal, compile_and_run, [''])
test('T12494', normal, compile_and_run, [''])
test('T12852', [when(opsys('mingw32'), skip), js_broken(22374)], compile_and_run, [''])
test('lazySTexamples', normal, compile_and_run, [''])
-test('T11760', [req_ghc_smp, req_target_smp], compile_and_run, ['-threaded -with-rtsopts=-N2'])
+test('T11760', [req_ghc_smp,
+ req_target_smp,
+ only_ways(['threaded1', 'threaded2', 'nonmoving_thr'])],
+ compile_and_run, ['-threaded -with-rtsopts=-N2'])
test('T12874', normal, compile_and_run, [''])
test('T13191',
[ collect_stats('bytes allocated', 5)
=====================================
libraries/hpc
=====================================
@@ -1 +1 @@
-Subproject commit 622595962acc1b07eaba4574c21375927579d189
+Subproject commit 767f476a5aa19260c8297ce40134f56d6f890019
=====================================
libraries/stm
=====================================
@@ -1 +1 @@
-Subproject commit 4ac6ead642829c9c983ee3c96ba13fa0308891ff
+Subproject commit cfb7e775c5f6df281b7052b7b4e4a51dafda10d2
=====================================
testsuite/tests/ado/all.T
=====================================
@@ -20,5 +20,5 @@ test('T15344', normal, compile_and_run, [''])
test('T16628', normal, compile_fail, [''])
test('T17835', normal, compile, [''])
test('T20540', normal, compile, [''])
-test('T16135', when(compiler_debugged(),expect_broken(16135)), compile, [''])
+test('T16135', [when(compiler_debugged(),expect_broken(16135)), js_broken(22576)], compile, [''])
test('T22483', normal, compile, ['-Wall'])
=====================================
testsuite/tests/cabal/t22333/all.T
=====================================
@@ -1,4 +1,4 @@
test('T22333',
- [extra_files(['Setup.hs', 'my-exe', 'my-package-a', 'my-package-b' ])],
+ [extra_files(['Setup.hs', 'my-exe', 'my-package-a', 'my-package-b' ]), js_broken(22573)],
makefile_test,
[])
=====================================
testsuite/tests/driver/T14075/all.T
=====================================
@@ -1,6 +1,5 @@
test('T14075',
[ extra_files(['F.hs', 'F.hs-boot', 'O.hs', 'V.hs', 'V.hs-boot'])
, req_ghc_smp # uses ghc --make -j2
- , js_broken(22261)
],
makefile_test, [])
=====================================
testsuite/tests/driver/all.T
=====================================
@@ -278,7 +278,7 @@ test('T13604a',
], makefile_test, [])
# omitting hpc and profasm because they affect the
# inlining and unfoldings
-test('inline-check', omit_ways(['hpc', 'profasm'])
+test('inline-check', [omit_ways(['hpc', 'profasm']), js_broken(22576)]
, compile
, ['-dinline-check foo -O -ddebug-output'])
@@ -319,4 +319,4 @@ test('T21869', [js_broken(22261), when(unregisterised(), skip)], makefile_test,
test('T22044', normal, makefile_test, [])
test('T22048', [only_ways(['normal']), grep_errmsg("_rule")], compile, ["-O -fomit-interface-pragmas -ddump-simpl"])
test('T21722', normal, compile_fail, ['-fno-show-error-context'])
-test('T22669', normal, makefile_test, [])
+test('T22669', js_skip, makefile_test, [])
=====================================
testsuite/tests/driver/fat-iface/T22405/all.T
=====================================
@@ -1,2 +1,2 @@
-test('T22405', [extra_files(['Main.hs'])], makefile_test, ['T22405'])
-test('T22405b', [extra_files(['Main2.hs'])], makefile_test, ['T22405b'])
+test('T22405', [extra_files(['Main.hs']), js_broken(22576)], makefile_test, ['T22405'])
+test('T22405b', [extra_files(['Main2.hs']), js_broken(22576)], makefile_test, ['T22405b'])
=====================================
testsuite/tests/driver/j-space/all.T
=====================================
@@ -1 +1 @@
-test('jspace', [extra_files(['genJspace']), req_target_smp, req_ghc_smp], makefile_test, ['jspace'])
+test('jspace', [extra_files(['genJspace']), req_target_smp, req_ghc_smp, js_broken(22573)], makefile_test, ['jspace'])
=====================================
testsuite/tests/driver/t22391/all.T
=====================================
@@ -1,5 +1,5 @@
test('t22391', [extra_files(['src'])],
multimod_compile, ['Lib', '-v1 -Wall -fhide-source-paths -isrc -fdefer-diagnostics'])
-test('t22391j', [req_target_smp, req_ghc_smp, extra_files(['src'])],
+test('t22391j', [req_ghc_smp, req_target_smp, extra_files(['src'])],
multimod_compile, ['Lib', '-v1 -Wall -fhide-source-paths -isrc -fdefer-diagnostics -j2'])
=====================================
testsuite/tests/lib/integer/all.T
=====================================
@@ -5,9 +5,9 @@ test('plusMinusInteger', [omit_ways(['ghci'])], compile_and_run, [''])
test('integerConstantFolding', normal, makefile_test, ['integerConstantFolding'])
test('naturalConstantFolding', normal, makefile_test, ['naturalConstantFolding'])
-test('fromToInteger', normal, makefile_test, ['fromToInteger'])
+test('fromToInteger', js_broken(22576), makefile_test, ['fromToInteger'])
-test('IntegerConversionRules', [], makefile_test, ['IntegerConversionRules'])
+test('IntegerConversionRules', [js_broken(22576)], makefile_test, ['IntegerConversionRules'])
test('gcdInteger', normal, compile_and_run, [''])
test('gcdeInteger', normal, compile_and_run, [''])
test('integerPowMod', [], compile_and_run, [''])
=====================================
testsuite/tests/numeric/should_run/all.T
=====================================
@@ -79,5 +79,5 @@ test('IntegerToFloat', normal, compile_and_run, [''])
test('T20291', normal, compile_and_run, [''])
test('T22282', normal, compile_and_run, [''])
-test('T22671', normal, compile_and_run, [''])
-test('foundation', normal, compile_and_run, ['-O -package transformers'])
+test('T22671', js_broken(22835), compile_and_run, [''])
+test('foundation', js_broken(22576), compile_and_run, ['-O -package transformers'])
=====================================
testsuite/tests/perf/compiler/all.T
=====================================
@@ -657,6 +657,6 @@ test('T21839c',
['-O'])
test ('InfiniteListFusion',
- [collect_stats('bytes allocated',2), when(arch('i386'), skip)],
+ [collect_stats('bytes allocated',2), when(arch('i386'), skip), js_broken(22576)],
compile_and_run,
['-O2 -package ghc'])
=====================================
testsuite/tests/rename/should_compile/all.T
=====================================
@@ -198,4 +198,4 @@ test('T22513e', normal, compile, ['-Wterm-variable-capture'])
test('T22513f', normal, compile, ['-Wterm-variable-capture'])
test('T22513g', normal, compile, ['-Wterm-variable-capture'])
test('T22513h', normal, compile, ['-Wterm-variable-capture'])
-test('T22513i', normal, compile, ['-Wterm-variable-capture'])
\ No newline at end of file
+test('T22513i', req_th, compile, ['-Wterm-variable-capture'])
=====================================
testsuite/tests/rename/should_fail/all.T
=====================================
@@ -184,7 +184,7 @@ test('T21605b', normal, compile_fail, [''])
test('T21605c', normal, compile_fail, [''])
test('T21605d', normal, compile_fail, [''])
test('T22839', normal, compile_fail, [''])
-test('RnPatternSynonymFail', normal, compile_fail, [''])
+test('RnPatternSynonymFail', js_broken(22261), compile_fail, [''])
test('RnMultipleFixityFail', normal, compile_fail, [''])
test('RnEmptyCaseFail', normal, compile_fail, [''])
test('RnDefaultSigFail', normal, compile_fail, [''])
=====================================
testsuite/tests/rep-poly/all.T
=====================================
@@ -85,7 +85,7 @@ test('RepPolyUnliftedNewtype', normal, compile,
['-fno-warn-partial-type-signatures -fno-warn-deprecated-flags'])
test('RepPolyWildcardPattern', normal, compile_fail, [''])
test('RepPolyWrappedVar', normal, compile_fail, [''])
-test('RepPolyWrappedVar2', normal, compile, [''])
+test('RepPolyWrappedVar2', js_broken(22576), compile, [''])
test('UnliftedNewtypesCoerceFail', normal, compile_fail, [''])
test('UnliftedNewtypesLevityBinder', normal, compile_fail, [''])
=====================================
testsuite/tests/rts/all.T
=====================================
@@ -404,7 +404,7 @@ test('T11788', [ when(ghc_dynamic(), skip)
, req_interp
], makefile_test, ['T11788'])
-test('T10296a', [req_ghc_smp], makefile_test, ['T10296a'])
+test('T10296a', [req_ghc_smp, req_c], makefile_test, ['T10296a'])
test('T10296b', [only_ways(['threaded2'])], compile_and_run, [''])
@@ -429,7 +429,9 @@ test('T12903', [ when(opsys('mingw32'), skip)
, compile_and_run, [''])
test('T13832', exit_code(1), compile_and_run, ['-threaded'])
-test('T13894', normal, compile_and_run, [''])
+# js_skip T13894 because the JS backend only allocates pinned arrays so this
+# test will always fail
+test('T13894', js_skip, compile_and_run, [''])
# this test fails with the profasm way on some machines but not others,
# so we just skip it.
test('T14497', [omit_ways(['profasm']), multi_cpu_race], compile_and_run, ['-O'])
=====================================
testsuite/tests/simplCore/should_compile/all.T
=====================================
@@ -378,7 +378,7 @@ test('T20200a', normal, compile, ['-O2'])
test('T20200b', normal, compile, ['-O2'])
test('T20200KG', [extra_files(['T20200KGa.hs', 'T20200KG.hs-boot'])], multimod_compile, ['T20200KG', '-v0 -O2 -fspecialise-aggressively'])
test('T20639', normal, compile, ['-O2'])
-test('T20894', normal, compile, ['-dcore-lint -O1 -ddebug-output'])
+test('T20894', js_broken(22576), compile, ['-dcore-lint -O1 -ddebug-output'])
test('T19790', normal, compile, ['-O -ddump-rule-firings'])
# This one had a Lint failure due to an occurrence analysis bug
=====================================
testsuite/tests/stranal/should_run/all.T
=====================================
@@ -1,6 +1,6 @@
# Run this always as we compile the test with -O0 and -O1 and check that the
# output is correct and the same in both cases.
-test('T16197', normal, makefile_test, [])
+test('T16197', js_broken(22576), makefile_test, [])
# Run the rest only in optasm way (which implies -O), we're testing the
# strictness analyser here
=====================================
testsuite/tests/type-data/should_compile/all.T
=====================================
@@ -3,5 +3,5 @@ test('TDExistential', normal, compile, [''])
test('TDGADT', normal, compile, [''])
test('TDGoodConsConstraints', normal, compile, [''])
test('TDVector', normal, compile, [''])
-test('TD_TH_splice', normal, compile, [''])
+test('TD_TH_splice', js_broken(22576), compile, [''])
test('T22315a', [extra_files(['T22315a/'])], multimod_compile, ['T22315a.Lib T22315a.Main', '-v0'])
=====================================
testsuite/tests/typecheck/should_fail/all.T
=====================================
@@ -328,7 +328,7 @@ test('T8262', normal, compile_fail, [''])
# TcCoercibleFail times out with the compiler is compiled with -DDEBUG.
# This is expected (see comment in source file).
-test('TcCoercibleFail', [when(compiler_debugged(), skip)], compile_fail, [''])
+test('TcCoercibleFail', [when(compiler_debugged(), skip), js_broken(22576)], compile_fail, [''])
test('TcCoercibleFail2', [], compile_fail, [''])
test('TcCoercibleFail3', [], compile_fail, [''])
@@ -413,7 +413,6 @@ test('T11990b', normal, compile_fail, [''])
test('T12035', [], multimod_compile_fail, ['T12035', '-v0'])
test('T12035j', [ extra_files(['T12035.hs', 'T12035a.hs', 'T12035.hs-boot'])
, req_ghc_smp
- , js_broken(22261)
], multimod_compile_fail, ['T12035', '-j2 -v0'])
test('T12045b', normal, compile_fail, [''])
test('T12045c', normal, compile_fail, [''])
=====================================
testsuite/tests/typecheck/should_run/all.T
=====================================
@@ -125,7 +125,7 @@ test('KindInvariant', normal, ghci_script, ['KindInvariant.script'])
# unboxed sums and ghci does not support those yet.
test('StrictPats', omit_ways(['ghci']), compile_and_run, [''])
test('T12809', omit_ways(['ghci']), compile_and_run, [''])
-test('EtaExpandLevPoly', omit_ways(['ghci']), compile_and_run, [''])
+test('EtaExpandLevPoly', [omit_ways(['ghci']), js_broken(22576)], compile_and_run, [''])
test('TestTypeableBinary', normal, compile_and_run, [''])
test('Typeable1', normal, compile_fail, ['-Werror'])
=====================================
testsuite/tests/unboxedsums/all.T
=====================================
@@ -45,7 +45,7 @@ test('unpack_sums_2', normal, compile, ['-O'])
test('unpack_sums_3', normal, compile_and_run, ['-O'])
test('unpack_sums_4', normal, compile_and_run, ['-O'])
test('unpack_sums_5', normal, compile, [''])
-test('unpack_sums_6', fragile(22504), compile_and_run, ['-O'])
+test('unpack_sums_6', [fragile(22504), js_broken(22374)], compile_and_run, ['-O'])
test('unpack_sums_7', normal, makefile_test, [])
test('unpack_sums_8', normal, compile_and_run, [""])
test('unpack_sums_9', normal, compile, [""])
@@ -59,6 +59,7 @@ test('T22208', normal, compile, ['-dstg-lint -dcmm-lint'])
test('ManyUbxSums',
[ pre_cmd('{compiler} --run ./GenManyUbxSums.hs'),
extra_files(['GenManyUbxSums.hs', 'ManyUbxSums_Addr.hs']),
+ js_broken(22576)
],
multi_compile_and_run,
['ManyUbxSums',
=====================================
testsuite/tests/unboxedsums/module/all.T
=====================================
@@ -1,2 +1,2 @@
-test('sum_mod', [normalise_slashes, extra_files(['Lib.hs', 'Main.hs']), js_broken(22261)],
+test('sum_mod', [normalise_slashes, extra_files(['Lib.hs', 'Main.hs'])],
run_command, ['$MAKE -s main --no-print-director'])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/394b91ce859653231813fb9af77c26664063c1b6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/394b91ce859653231813fb9af77c26664063c1b6
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230202/8c15b48d/attachment-0001.html>
More information about the ghc-commits
mailing list