Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
28861153
Commit
28861153
authored
Dec 16, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The fork test was working, though the tester needed some updates
parent
dd8d1430
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
test/tests/fork.py
test/tests/fork.py
+2
-1
tools/tester.py
tools/tester.py
+15
-4
No files found.
test/tests/fork.py
View file @
28861153
# skip-if: True
# no-collect-stats
# allow-warning: converting unicode literal to str
from
thread
import
start_new_thread
from
thread
import
start_new_thread
import
time
import
time
...
...
tools/tester.py
View file @
28861153
...
@@ -122,7 +122,8 @@ def run_test(fn, check_stats, run_memcheck):
...
@@ -122,7 +122,8 @@ def run_test(fn, check_stats, run_memcheck):
r
=
fn
.
rjust
(
FN_JUST_SIZE
)
r
=
fn
.
rjust
(
FN_JUST_SIZE
)
statchecks
=
[]
statchecks
=
[]
jit_args
=
[
"-csrq"
]
+
EXTRA_JIT_ARGS
jit_args
=
[
"-crq"
]
+
EXTRA_JIT_ARGS
collect_stats
=
True
expected
=
"success"
expected
=
"success"
allow_warnings
=
[]
allow_warnings
=
[]
for
l
in
open
(
fn
):
for
l
in
open
(
fn
):
...
@@ -150,6 +151,14 @@ def run_test(fn, check_stats, run_memcheck):
...
@@ -150,6 +151,14 @@ def run_test(fn, check_stats, run_memcheck):
return
r
+
" (skipped due to 'skip-if: %s')"
%
skip_if
[:
30
]
return
r
+
" (skipped due to 'skip-if: %s')"
%
skip_if
[:
30
]
elif
l
.
startswith
(
"# allow-warning:"
):
elif
l
.
startswith
(
"# allow-warning:"
):
allow_warnings
.
append
(
"Warning: "
+
l
.
split
(
':'
,
1
)[
1
].
strip
())
allow_warnings
.
append
(
"Warning: "
+
l
.
split
(
':'
,
1
)[
1
].
strip
())
elif
l
.
startswith
(
"# no-collect-stats"
):
collect_stats
=
False
if
TEST_PYPY
:
collect_stats
=
False
if
collect_stats
:
jit_args
=
[
'-s'
]
+
jit_args
assert
expected
in
(
"success"
,
"fail"
,
"statfail"
),
expected
assert
expected
in
(
"success"
,
"fail"
,
"statfail"
),
expected
...
@@ -167,17 +176,19 @@ def run_test(fn, check_stats, run_memcheck):
...
@@ -167,17 +176,19 @@ def run_test(fn, check_stats, run_memcheck):
code
=
p
.
wait
()
code
=
p
.
wait
()
elapsed
=
time
.
time
()
-
start
elapsed
=
time
.
time
()
-
start
stats
=
{}
if
allow_warnings
:
if
allow_warnings
:
out_lines
=
[]
out_lines
=
[]
for
l
in
out
.
split
(
'
\
n
'
):
for
l
in
out
.
split
(
'
\
n
'
):
for
regex
in
allow_warnings
:
for
regex
in
allow_warnings
:
if
re
.
match
(
l
,
regex
):
if
re
.
match
(
regex
,
l
):
break
break
else
:
else
:
out_lines
.
append
(
l
)
out_lines
.
append
(
l
)
out
=
"
\
n
"
.
join
(
out_lines
)
out
=
"
\
n
"
.
join
(
out_lines
)
if
code
==
0
and
not
TEST_PYPY
:
stats
=
None
if
code
==
0
and
collect_stats
:
stats
=
{}
assert
out
.
count
(
"Stats:"
)
==
1
assert
out
.
count
(
"Stats:"
)
==
1
out
,
stats_str
=
out
.
split
(
"Stats:"
)
out
,
stats_str
=
out
.
split
(
"Stats:"
)
for
l
in
stats_str
.
strip
().
split
(
'
\
n
'
):
for
l
in
stats_str
.
strip
().
split
(
'
\
n
'
):
...
...
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