Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pcl-expect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Per Cederqvist
pcl-expect
Commits
07427cd4
Commit
07427cd4
authored
20 years ago
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
New file. Run all automatic tests.
parent
c70a2dfe
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
testdriver.py
+35
-0
35 additions, 0 deletions
testdriver.py
with
35 additions
and
0 deletions
testdriver.py
0 → 100755
+
35
−
0
View file @
07427cd4
#! /usr/bin/env python
import
os
import
sys
import
unittest
def
findsuites
():
suites
=
[]
for
fn
in
os
.
listdir
(
'
test
'
):
if
fn
.
startswith
(
'
test_
'
)
and
fn
.
endswith
(
'
.py
'
):
suites
.
append
(
'
test.
'
+
fn
[:
-
3
])
suites
.
sort
()
return
suites
def
my_import
(
name
):
mod
=
__import__
(
name
)
components
=
name
.
split
(
'
.
'
)
for
comp
in
components
[
1
:]:
mod
=
getattr
(
mod
,
comp
)
return
mod
def
main
():
suites
=
findsuites
()
all
=
unittest
.
TestSuite
()
load
=
unittest
.
defaultTestLoader
.
loadTestsFromModule
for
suite
in
suites
:
all
.
addTest
(
load
(
my_import
(
suite
)))
res
=
unittest
.
TextTestRunner
().
run
(
all
)
res
.
stream
=
unittest
.
_WritelnDecorator
(
open
(
"
test.result
"
,
"
w
"
))
res
.
printErrors
()
return
not
res
.
wasSuccessful
()
if
__name__
==
'
__main__
'
:
main
()
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