Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LabComm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Gestegård Robertz
LabComm
Commits
dadd6d29
Commit
dadd6d29
authored
Mar 30, 2014
by
Sven Gestegård Robertz
Browse files
Options
Downloads
Plain Diff
Merge branch 'voidtest'
parents
9ca60152
e86fc9b2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/relay_gen_java.py
+1
-1
1 addition, 1 deletion
test/relay_gen_java.py
test/test_errors.py
+49
-0
49 additions, 0 deletions
test/test_errors.py
with
50 additions
and
1 deletion
test/relay_gen_java.py
+
1
−
1
View file @
dadd6d29
...
...
@@ -16,7 +16,7 @@ if __name__ == '__main__':
f
=
open
(
sys
.
argv
[
1
])
sample
=
[]
for
l
in
map
(
lambda
s
:
s
.
strip
(),
f
):
lang
,
kind
,
func
,
arg
=
l
[
1
:].
split
(
l
[
0
])
lang
,
kind
,
func
,
arg
,
dummy
=
l
[
1
:].
split
(
l
[
0
])
if
lang
==
'
Java
'
and
kind
==
'
sample
'
:
sample
.
append
((
func
,
arg
))
pass
...
...
This diff is collapsed.
Click to expand it.
test/test_errors.py
0 → 100755
+
49
−
0
View file @
dadd6d29
#!/usr/bin/python
import
sys
import
argparse
import
subprocess
# returns true if test fails
def
test_labcomm_compile_OK
(
lc
,
args
):
cmd
=
args
.
labcomm
.
split
()
+
[
lc
]
try
:
res
=
subprocess
.
check_call
(
cmd
)
print
"
sucess!
"
return
False
except
subprocess
.
CalledProcessError
as
ex
:
print
ex
.
output
print
ex
.
returncode
return
True
def
test_labcomm_compile_fail
(
lc
,
args
):
cmd
=
args
.
labcomm
.
split
()
+
[
lc
]
try
:
res
=
subprocess
.
check_call
(
cmd
)
print
"
failed! (should have produced an error)
"
return
True
except
subprocess
.
CalledProcessError
as
ex
:
print
"
sucess!
"
print
ex
.
output
print
ex
.
returncode
return
False
;
if
__name__
==
'
__main__
'
:
parser
=
argparse
.
ArgumentParser
(
description
=
'
Run test of error messages.
'
)
parser
.
add_argument
(
'
--labcomm
'
);
parser
.
add_argument
(
'
--testOK
'
,
nargs
=
'
*
'
,
default
=
[])
parser
.
add_argument
(
'
--testNOK
'
,
nargs
=
'
*
'
,
default
=
[])
args
=
parser
.
parse_args
()
fail
=
False
;
for
test
in
args
.
testOK
:
fail
=
fail
or
test_labcomm_compile_OK
(
test
,
args
)
pass
for
test
in
args
.
testNOK
:
fail
=
fail
or
test_labcomm_compile_fail
(
test
,
args
)
pass
if
fail
:
print
"
*** fail ***
"
else
:
print
"
*** success ***
"
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment