Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
23261f3a
Commit
23261f3a
authored
Mar 23, 2014
by
Damien George
Browse files
Merge branch 'master' of github.com:micropython/micropython
parents
965e2baf
fd232c3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/run-tests
View file @
23261f3a
...
...
@@ -12,6 +12,10 @@ else:
CPYTHON3
=
'python3.3'
MP_PY
=
'../unix/micropython'
def
rm_f
(
fname
):
if
os
.
path
.
exists
(
fname
):
os
.
remove
(
fname
)
test_count
=
0
testcase_count
=
0
passed_count
=
0
...
...
@@ -30,14 +34,20 @@ for test_file in tests:
try
:
output_mupy
=
subprocess
.
check_output
([
MP_PY
,
test_file
])
except
subprocess
.
CalledProcessError
:
output_mupy
=
'CRASH'
output_mupy
=
b
'CRASH'
testcase_count
+=
len
(
output_expected
.
splitlines
())
if
output_expected
==
output_mupy
:
print
(
"pass "
,
test_file
)
passed_count
+=
1
rm_f
(
os
.
path
.
basename
(
test_file
+
".exp"
))
rm_f
(
os
.
path
.
basename
(
test_file
+
".out"
))
else
:
with
open
(
os
.
path
.
basename
(
test_file
+
".exp"
),
"w"
)
as
f
:
f
.
write
(
str
(
output_expected
,
"ascii"
))
with
open
(
os
.
path
.
basename
(
test_file
+
".out"
),
"w"
)
as
f
:
f
.
write
(
str
(
output_mupy
,
"ascii"
))
print
(
"FAIL "
,
test_file
)
failed_tests
.
append
(
test_name
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment