Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
typon-compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
typon
typon-compiler
Commits
d859887b
Commit
d859887b
authored
Sep 11, 2023
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Invert silent flag
parent
eebee103
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
trans/test_runner.py
trans/test_runner.py
+5
-5
No files found.
trans/test_runner.py
View file @
d859887b
...
@@ -31,7 +31,7 @@ parser = argparse.ArgumentParser()
...
@@ -31,7 +31,7 @@ parser = argparse.ArgumentParser()
parser
.
add_argument
(
"-c"
,
"--compile"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-c"
,
"--compile"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-g"
,
"--generate"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-g"
,
"--generate"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-o"
,
"--only"
,
nargs
=
"+"
)
parser
.
add_argument
(
"-o"
,
"--only"
,
nargs
=
"+"
)
parser
.
add_argument
(
"-
s"
,
"--silent
"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-
v"
,
"--verbose
"
,
action
=
"store_true"
)
parser
.
add_argument
(
"-w"
,
"--workers"
,
type
=
int
,
default
=
None
)
parser
.
add_argument
(
"-w"
,
"--workers"
,
type
=
int
,
default
=
None
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
@@ -110,7 +110,10 @@ signal.signal(signal.SIGINT, sigint_handler)
...
@@ -110,7 +110,10 @@ signal.signal(signal.SIGINT, sigint_handler)
def
run_tests
():
def
run_tests
():
tests
=
sorted
(
Path
(
'tests'
).
glob
(
'*.py'
))
tests
=
sorted
(
Path
(
'tests'
).
glob
(
'*.py'
))
if
args
.
silent
:
if
args
.
verbose
:
for
path
in
tests
:
run_test
(
path
,
False
)
else
:
pool
=
concurrent
.
futures
.
ProcessPoolExecutor
(
args
.
workers
)
pool
=
concurrent
.
futures
.
ProcessPoolExecutor
(
args
.
workers
)
print
(
"Running"
,
len
(
tests
),
"tests as"
,
pool
.
_max_workers
,
"workers"
)
print
(
"Running"
,
len
(
tests
),
"tests as"
,
pool
.
_max_workers
,
"workers"
)
start
=
datetime
.
now
()
start
=
datetime
.
now
()
...
@@ -121,9 +124,6 @@ def run_tests():
...
@@ -121,9 +124,6 @@ def run_tests():
print
(
f"[
{
status
.
ascii
()
}
] (
{
duration
.
total_seconds
():
2.2
f
}
s)
{
path
.
name
}
"
)
print
(
f"[
{
status
.
ascii
()
}
] (
{
duration
.
total_seconds
():
2.2
f
}
s)
{
path
.
name
}
"
)
duration
=
datetime
.
now
()
-
start
duration
=
datetime
.
now
()
-
start
print
(
"Done in"
,
duration
.
total_seconds
(),
"seconds"
)
print
(
"Done in"
,
duration
.
total_seconds
(),
"seconds"
)
else
:
for
path
in
tests
:
run_test
(
path
,
False
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
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