summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2023-02-02 16:01:56 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-02-06 09:43:21 -0500
commit6636b670233522f01d002c9b97827d00289dbf5c (patch)
treeccfd2ae729261fdb52e97dec8629a875b58e4512 /testsuite
parentb18fbf52f98d0128c52b3a90ddca727a6d5d4d45 (diff)
downloadhaskell-6636b670233522f01d002c9b97827d00289dbf5c.tar.gz
JS: replace "js" architecture with "javascript"
Despite Cabal supporting any architecture name, `cabal --check` only supports a few built-in ones. Sadly `cabal --check` is used by Hackage hence using any non built-in name in a package (e.g. `arch(js)`) is rejected and the package is prevented from being uploaded on Hackage. Luckily built-in support for the `javascript` architecture was added for GHCJS a while ago. In order to allow newer `base` to be uploaded on Hackage we make the switch from `js` to `javascript` architecture. Fixes #22740. Co-authored-by: Ben Gamari <ben@smart-cactus.org>
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/config/ghc4
-rw-r--r--testsuite/driver/testlib.py6
-rw-r--r--testsuite/tests/concurrent/should_run/all.T2
-rw-r--r--testsuite/tests/numeric/should_run/all.T2
-rw-r--r--testsuite/tests/rts/all.T2
5 files changed, 8 insertions, 8 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 1d4ae80695..1821d5a572 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -70,12 +70,12 @@ if windows:
config.other_ways += winio_ways
# LLVM
-if not config.unregisterised and not config.arch == "js" and config.have_llvm:
+if not config.unregisterised and not config.arch == "javascript" and config.have_llvm:
config.compile_ways.append('optllvm')
config.run_ways.append('optllvm')
# HPC
-if not config.arch == "js":
+if not config.arch == "javascript":
config.compile_ways.append('hpc')
config.run_ways.append('hpc')
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index bc83038d2b..96ff802c0d 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -139,12 +139,12 @@ def skip( name, opts ):
# disable test on JS arch
def js_skip( name, opts ):
- if arch("js"):
+ if arch("javascript"):
skip(name,opts)
# expect broken for the JS backend
def js_broken( bug: IssueNumber ):
- if arch("js"):
+ if arch("javascript"):
return expect_broken(bug);
else:
return normal;
@@ -2364,7 +2364,7 @@ def normalise_errmsg(s: str) -> str:
# The inplace ghc's are called ghc-stage[123] to avoid filename
# collisions, so we need to normalise that to just "ghc"
s = re.sub('ghc-stage[123]', 'ghc', s)
- # Remove platform prefix (e.g. js-unknown-ghcjs) for cross-compiled tools
+ # Remove platform prefix (e.g. javascript-unknown-ghcjs) for cross-compiled tools
# (ghc, ghc-pkg, unlit, etc.)
s = re.sub('\\w+-\\w+-\\w+-ghc', 'ghc', s)
s = re.sub('\\w+-\\w+-\\w+-unlit', 'unlit', s)
diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T
index 047f70e6d8..7a4208ff67 100644
--- a/testsuite/tests/concurrent/should_run/all.T
+++ b/testsuite/tests/concurrent/should_run/all.T
@@ -130,7 +130,7 @@ test('conc012',
test('conc013', normal, compile_and_run, [''])
test('conc014', normal, compile_and_run, [''])
test('conc015',
- [ when(arch("js"), fragile(22261)) # delays are flaky with the JS backend when the system is overloaded
+ [ when(arch("javascript"), fragile(22261)) # delays are flaky with the JS backend when the system is overloaded
], compile_and_run, [''])
test('conc015a', normal, compile_and_run, [''])
test('conc016', [omit_ways(concurrent_ways) # see comment in conc016.hs
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index e4d558ea13..a9d5ef7b12 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -63,7 +63,7 @@ test('T9407', normal, compile_and_run, [''])
test('T9810', normal, compile_and_run, [''])
test('T10011', normal, compile_and_run, [''])
test('T10962', omit_ways(['ghci']), compile_and_run, ['-O2'])
-test('T11702', [unless(arch("js"),extra_ways(['optasm']))], compile_and_run, [''])
+test('T11702', [unless(arch("javascript"),extra_ways(['optasm']))], compile_and_run, [''])
test('T12136', normal, compile_and_run, [''])
test('T15301', normal, compile_and_run, ['-O2'])
test('T497', normal, compile_and_run, ['-O'])
diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T
index f3349e0232..7effbe6b01 100644
--- a/testsuite/tests/rts/all.T
+++ b/testsuite/tests/rts/all.T
@@ -42,7 +42,7 @@ test('derefnull',
when(platform('aarch64-apple-darwin'), [ignore_stderr, exit_code(139)]),
when(opsys('mingw32'), [ignore_stderr, exit_code(11)]),
when(opsys('mingw32'), [fragile(18548)]),
- when(platform('js-unknown-ghcjs'), [ignore_stderr, exit_code(1)]),
+ when(arch('javascript'), [ignore_stderr, exit_code(1)]),
# ThreadSanitizer changes the output
when(have_thread_sanitizer(), skip),
# since these test are supposed to crash the