Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
GHC
Commits
d6e68b28
Commit
d6e68b28
authored
1 year ago
by
Zubin
Browse files
Options
Downloads
Patches
Plain Diff
testsuite: Teach testsuite driver about c++ sources
parent
d471d445
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testsuite/driver/testglobals.py
+2
-1
2 additions, 1 deletion
testsuite/driver/testglobals.py
testsuite/driver/testlib.py
+14
-0
14 additions, 0 deletions
testsuite/driver/testlib.py
with
16 additions
and
1 deletion
testsuite/driver/testglobals.py
+
2
−
1
View file @
d6e68b28
...
...
@@ -399,8 +399,9 @@ class TestOptions:
# Does this test use a literate (.lhs) file?
self
.
literate
=
False
# Does this test use a .c, .m or .mm file?
# Does this test use a .c,
.cpp,
.m or .mm file?
self
.
c_src
=
False
self
.
cpp_src
=
False
self
.
objc_src
=
False
self
.
objcpp_src
=
False
...
...
This diff is collapsed.
Click to expand it.
testsuite/driver/testlib.py
+
14
−
0
View file @
d6e68b28
...
...
@@ -299,6 +299,13 @@ def req_c( name, opts ):
# JS backend doesn't support C (yet)
js_skip
(
name
,
opts
)
def
req_cpp
(
name
,
opts
):
"""
Mark a test as requiring C source file support
"""
# JS backend doesn't support C (yet)
js_skip
(
name
,
opts
)
def
req_cmm
(
name
,
opts
):
"""
Mark a test as requiring Cmm support
...
...
@@ -953,6 +960,10 @@ def c_src( name, opts ):
opts
.
c_src
=
True
req_c
(
name
,
opts
)
def
cpp_src
(
name
,
opts
):
opts
.
cpp_src
=
True
req_c
(
name
,
opts
)
def
objc_src
(
name
,
opts
):
opts
.
objc_src
=
True
...
...
@@ -1948,6 +1959,7 @@ async def simple_build(name: Union[TestName, str],
# Required by GHC 7.3+, harmless for earlier versions:
if
(
getTestOpts
().
c_src
or
getTestOpts
().
cpp_src
or
getTestOpts
().
objc_src
or
getTestOpts
().
objcpp_src
):
extra_hc_opts
+=
'
-no-hs-main
'
...
...
@@ -2922,6 +2934,8 @@ def add_hs_lhs_suffix(name: str) -> Path:
return
add_suffix
(
name
,
'
c
'
)
elif
getTestOpts
().
cmm_src
:
return
add_suffix
(
name
,
'
cmm
'
)
elif
getTestOpts
().
cpp_src
:
return
add_suffix
(
name
,
'
cpp
'
)
elif
getTestOpts
().
objc_src
:
return
add_suffix
(
name
,
'
m
'
)
elif
getTestOpts
().
objcpp_src
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment