Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,310
Issues
4,310
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
382
Merge Requests
382
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
9d677eeb
Commit
9d677eeb
authored
Dec 03, 2010
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cope if the compiler doesn't tell us the "Global Package DB"
parent
f8b27adf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
testsuite/config/ghc
testsuite/config/ghc
+4
-2
testsuite/driver/testlib.py
testsuite/driver/testlib.py
+12
-10
No files found.
testsuite/config/ghc
View file @
9d677eeb
...
...
@@ -142,5 +142,7 @@ def get_compiler_info():
else:
config.compiler_profiled = False
config.package_conf_cache_file = compilerInfoDict["Global Package DB"] + '/package.cache'
try:
config.package_conf_cache_file = compilerInfoDict["Global Package DB"] + '/package.cache'
except:
config.package_conf_cache_file = ''
testsuite/driver/testlib.py
View file @
9d677eeb
...
...
@@ -491,14 +491,21 @@ if config.use_threads:
t
.
thread_pool
.
notify
()
t
.
thread_pool
.
release
()
def
get_package_cache_timestamp
():
if
config
.
package_conf_cache_file
==
''
:
return
0.0
else
:
try
:
return
os
.
stat
(
config
.
package_conf_cache_file
).
st_mtime
except
:
return
0.0
def
test_common_work
(
name
,
opts
,
func
,
args
):
t
.
total_tests
=
t
.
total_tests
+
1
setLocalTestOpts
(
opts
)
try
:
package_conf_cache_file_start_timestamp
=
os
.
stat
(
config
.
package_conf_cache_file
).
st_mtime
except
e
:
package_conf_cache_file_start_timestamp
=
0.0
package_conf_cache_file_start_timestamp
=
get_package_cache_timestamp
()
# All the ways we might run this test
if
func
==
compile
or
func
==
multimod_compile
:
...
...
@@ -567,15 +574,10 @@ def test_common_work (name, opts, func, args):
except
e
:
framework_fail
(
name
,
'cleaning'
,
'clean-command exception'
)
try
:
package_conf_cache_file_end_timestamp
=
os
.
stat
(
config
.
package_conf_cache_file
).
st_mtime
except
e
:
package_conf_cache_file_end_timestamp
=
0.0
package_conf_cache_file_end_timestamp
=
get_package_cache_timestamp
();
if
package_conf_cache_file_start_timestamp
!=
package_conf_cache_file_end_timestamp
:
framework_fail
(
name
,
'whole-test'
,
'Package cache timestamps do not match: '
+
str
(
package_conf_cache_file_start_timestamp
)
+
' '
+
str
(
package_conf_cache_file_end_timestamp
))
elif
package_conf_cache_file_start_timestamp
==
0.0
:
framework_fail
(
name
,
'whole-test'
,
'Package cache timestamps 0.0'
)
def
clean
(
names
):
clean_full_paths
(
map
(
lambda
name
:
in_testdir
(
name
),
names
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment