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
ee666ed5
Commit
ee666ed5
authored
Jun 15, 2023
by
Tom Niget
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add directive for not running tests (for interactive ones)
parent
dfa7f148
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
trans/test_runner.py
trans/test_runner.py
+7
-2
trans/tests/webserver.py
trans/tests/webserver.py
+1
-0
No files found.
trans/test_runner.py
View file @
ee666ed5
...
@@ -24,7 +24,9 @@ def run_tests():
...
@@ -24,7 +24,9 @@ def run_tests():
print
(
"Skipping"
)
print
(
"Skipping"
)
continue
continue
with
open
(
path
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
with
open
(
path
,
"r"
,
encoding
=
"utf-8"
)
as
f
:
res
=
format_code
(
transpile
(
f
.
read
()))
code
=
f
.
read
()
execute
=
"# norun"
not
in
code
res
=
format_code
(
transpile
(
code
))
#print(res)
#print(res)
name_cpp
=
path
.
with_suffix
(
'.cpp'
)
name_cpp
=
path
.
with_suffix
(
'.cpp'
)
with
open
(
name_cpp
,
"w"
,
encoding
=
"utf-8"
)
as
fcpp
:
with
open
(
name_cpp
,
"w"
,
encoding
=
"utf-8"
)
as
fcpp
:
...
@@ -32,9 +34,12 @@ def run_tests():
...
@@ -32,9 +34,12 @@ def run_tests():
print
(
".cpp generated"
)
print
(
".cpp generated"
)
if
args
.
compile
:
if
args
.
compile
:
continue
continue
if
not
execute
:
print
(
"Not executing"
,
path
.
name
)
continue
name_bin
=
path
.
with_suffix
(
''
).
as_posix
()
name_bin
=
path
.
with_suffix
(
''
).
as_posix
()
commands
=
[
commands
=
[
#
f"bash -c 'PYTHONPATH=stdlib python3 ./{path.as_posix()}'",
f"bash -c 'PYTHONPATH=stdlib python3 ./
{
path
.
as_posix
()
}
'"
,
]
]
if
alt
:
=
environ
.
get
(
"ALT_RUNNER"
):
if
alt
:
=
environ
.
get
(
"ALT_RUNNER"
):
commands
.
append
(
alt
.
format
(
name_bin
=
name_bin
,
name_cpp_posix
=
name_cpp
.
as_posix
()))
commands
.
append
(
alt
.
format
(
name_bin
=
name_bin
,
name_cpp_posix
=
name_cpp
.
as_posix
()))
...
...
trans/tests/webserver.py
View file @
ee666ed5
# coding: utf-8
# coding: utf-8
# norun
import
sys
import
sys
from
socket
import
socket
,
SOCK_STREAM
,
AF_INET6
,
SOL_SOCKET
,
SO_REUSEADDR
from
socket
import
socket
,
SOCK_STREAM
,
AF_INET6
,
SOL_SOCKET
,
SO_REUSEADDR
...
...
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