Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
9c6f7378
Commit
9c6f7378
authored
Oct 06, 2014
by
Damien George
Browse files
tests: Make run-tests-exp.sh skip tests that fail due to invalid decorator.
Should address issue #856.
parent
f32498fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/run-tests-exp.sh
View file @
9c6f7378
...
...
@@ -11,12 +11,14 @@ MP_PY=micropython
numtests
=
0
numtestcases
=
0
numpassed
=
0
numskipped
=
0
numfailed
=
0
nameskipped
=
namefailed
=
if
[
$#
-eq
0
]
then
tests
=
"basics/*.py micropython/*.py float/*.py import/*.py io/*.py misc/*.py"
tests
=
"basics/*.py micropython/*.py float/*.py import/*.py io/*.py misc/*.py
unicode/*.py extmod/*.py unix/*.py
"
else
tests
=
"
$@
"
fi
...
...
@@ -24,23 +26,32 @@ fi
for
infile
in
$tests
do
basename
=
`
basename
$infile
.py
`
outfile
=
${
basename
}
.out
outfile
=
${
basename
}
.
py.
out
expfile
=
$infile
.exp
$MP_PY
$infile
>
$outfile
numtestcases
=
$(
expr
$numtestcases
+
$(
cat
$expfile
|
wc
-l
))
diff
--brief
$expfile
$outfile
>
/dev/null
if
[
$?
-eq
0
]
if
grep
-q
"SyntaxError: invalid micropython decorator"
$outfile
then
echo
"pass
$infile
"
# we don't count tests that fail due to unsupported decorator
echo
"skip
$infile
"
$RM
$outfile
numpassed
=
$(
expr
$numpassed
+ 1
)
numskipped
=
$(
expr
$numskipped
+ 1
)
nameskipped
=
"
$nameskipped
$basename
"
else
echo
"FAIL
$infile
"
numfailed
=
$(
expr
$numfailed
+ 1
)
namefailed
=
"
$namefailed
$basename
"
diff
--brief
$expfile
$outfile
>
/dev/null
if
[
$?
-eq
0
]
then
echo
"pass
$infile
"
$RM
$outfile
numpassed
=
$(
expr
$numpassed
+ 1
)
else
echo
"FAIL
$infile
"
numfailed
=
$(
expr
$numfailed
+ 1
)
namefailed
=
"
$namefailed
$basename
"
fi
fi
numtests
=
$(
expr
$numtests
+ 1
)
...
...
@@ -48,6 +59,10 @@ done
echo
"
$numtests
tests performed (
$numtestcases
individual testcases)"
echo
"
$numpassed
tests passed"
if
[
$numskipped
!=
0
]
then
echo
"
$numskipped
tests skipped -
$nameskipped
"
fi
if
[
$numfailed
!=
0
]
then
echo
"
$numfailed
tests failed -
$namefailed
"
...
...
Write
Preview
Supports
Markdown
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