Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
8af9881e
Commit
8af9881e
authored
8 years ago
by
Massimiliano Culpo
Committed by
Todd Gamblin
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
spack test : exits after ctrl+c fixes #2029 (#2082)
parent
9d3d4922
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
lib/spack/spack/test/__init__.py
+23
-15
23 additions, 15 deletions
lib/spack/spack/test/__init__.py
lib/spack/spack/test/tally_plugin.py
+4
-0
4 additions, 0 deletions
lib/spack/spack/test/tally_plugin.py
with
27 additions
and
15 deletions
lib/spack/spack/test/__init__.py
+
23
−
15
View file @
8af9881e
...
...
@@ -107,25 +107,33 @@ def run(names, outputDir, verbose=False):
sys
.
exit
(
1
)
tally
=
Tally
()
for
test
in
names
:
module
=
'
spack.test.
'
+
test
print
(
module
)
tty
.
msg
(
"
Running test: %s
"
%
test
)
modules
=
[
'
spack.test.
'
+
test
for
test
in
names
]
runOpts
=
[
"
--with-%s
"
%
spack
.
test
.
tally_plugin
.
Tally
.
name
]
runOpts
=
[
"
--with-%s
"
%
spack
.
test
.
tally_plugin
.
Tally
.
name
]
if
outputDir
:
xmlOutputFname
=
"
unittests-{0}.xml
"
.
format
(
test
)
xmlOutputPath
=
join_path
(
outputDir
,
xmlOutputFname
)
runOpts
+=
[
"
--with-xunit
"
,
"
--xunit-file={0}
"
.
format
(
xmlOutputPath
)]
argv
=
[
""
]
+
runOpts
+
[
module
]
nose
.
run
(
argv
=
argv
,
addplugins
=
[
tally
])
if
outputDir
:
xmlOutputFname
=
"
unittests-{0}.xml
"
.
format
(
test
)
xmlOutputPath
=
join_path
(
outputDir
,
xmlOutputFname
)
runOpts
+=
[
"
--with-xunit
"
,
"
--xunit-file={0}
"
.
format
(
xmlOutputPath
)]
argv
=
[
""
]
+
runOpts
+
modules
nose
.
run
(
argv
=
argv
,
addplugins
=
[
tally
])
succeeded
=
not
tally
.
failCount
and
not
tally
.
errorCount
tty
.
msg
(
"
Tests Complete.
"
,
"
%5d tests run
"
%
tally
.
numberOfTestsRun
,
"
%5d failures
"
%
tally
.
failCount
,
"
%5d errors
"
%
tally
.
errorCount
)
tty
.
msg
(
"
Tests Complete.
"
,
"
%5d tests run
"
%
tally
.
numberOfTestsRun
,
"
%5d failures
"
%
tally
.
failCount
,
"
%5d errors
"
%
tally
.
errorCount
)
if
tally
.
fail_list
:
items
=
[
x
for
x
in
tally
.
fail_list
]
tty
.
msg
(
'
List of failing tests:
'
,
*
items
)
if
tally
.
error_list
:
items
=
[
x
for
x
in
tally
.
error_list
]
tty
.
msg
(
'
List of tests with errors:
'
,
*
items
)
if
succeeded
:
tty
.
info
(
"
OK
"
,
format
=
'
g
'
)
...
...
This diff is collapsed.
Click to expand it.
lib/spack/spack/test/tally_plugin.py
+
4
−
0
View file @
8af9881e
...
...
@@ -35,6 +35,8 @@ def __init__(self):
self
.
successCount
=
0
self
.
failCount
=
0
self
.
errorCount
=
0
self
.
error_list
=
[]
self
.
fail_list
=
[]
@property
def
numberOfTestsRun
(
self
):
...
...
@@ -52,9 +54,11 @@ def addSuccess(self, test):
def
addError
(
self
,
test
,
err
):
self
.
errorCount
+=
1
self
.
error_list
.
append
(
test
)
def
addFailure
(
self
,
test
,
err
):
self
.
failCount
+=
1
self
.
fail_list
.
append
(
test
)
def
finalize
(
self
,
result
):
pass
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