Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CCS
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marko Mecina
CCS
Commits
36353023
Commit
36353023
authored
9 months ago
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
update test script generator
parent
2d027583
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tst/json_to_barescript.py
+6
-3
6 additions, 3 deletions
Tst/json_to_barescript.py
with
6 additions
and
3 deletions
Tst/json_to_barescript.py
+
6
−
3
View file @
36353023
...
...
@@ -13,7 +13,7 @@ import os
import
json
import
sys
MIB_VERSION
=
'
1.
5
'
MIB_VERSION
=
'
1.
8.1
'
def
run
(
jfile
,
outfile
,
reportfunc
=
False
,
specfile
=
None
):
...
...
@@ -45,7 +45,10 @@ def run(jfile, outfile, reportfunc=False, specfile=None):
script
+=
'
ask_tc_exec = True
\n
'
script
+=
'
report = cfl.TestReport(specfile, rep_version, mib_version, gui=True)
\n\n
'
script
+=
'
# Precond.
\n
# {}
\n
#! CCS.BREAKPOINT
\n\n
'
.
format
(
replace_newline
(
data
[
'
_precon_descr
'
]))
# init code
script
+=
'
# INIT CODE
\n
{}
\n
#! CCS.BREAKPOINT
\n\n
'
.
format
(
data
[
'
_custom_imports
'
])
script
+=
'
# PRECONDITIONS
\n
# {}
\n
#! CCS.BREAKPOINT
\n\n
'
.
format
(
replace_newline
(
data
[
'
_precon_descr
'
]))
# script += '{}\n\n\n'.format(data['_precon_code'].strip()) # Add the precondition code
for
step
in
data
[
'
sequences
'
][
0
][
'
steps
'
]:
...
...
@@ -74,7 +77,7 @@ def run(jfile, outfile, reportfunc=False, specfile=None):
script
+=
txt
script
+=
'
# P
ostcond.
\n
# {}
\n
'
.
format
(
replace_newline
(
data
[
'
_postcon_descr
'
]))
script
+=
'
# P
OSTCONDITIONS
\n
# {}
\n
'
.
format
(
replace_newline
(
data
[
'
_postcon_descr
'
]))
# script += data['_postcon_code'].strip() # Add the postcondition code
if
reportfunc
:
...
...
This diff is collapsed.
Click to expand it.
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