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
5db02f27
Commit
5db02f27
authored
2 months ago
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
fix formatting in python script generator
parent
02acdd5c
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
+4
-4
4 additions, 4 deletions
Tst/json_to_barescript.py
with
4 additions
and
4 deletions
Tst/json_to_barescript.py
+
4
−
4
View file @
5db02f27
...
...
@@ -46,13 +46,13 @@ def run(jfile, outfile, reportfunc=False, specfile=None):
script
+=
'
report = cfl.TestReport(specfile, rep_version, mib_version, gui=True)
\n\n
'
# init code
script
+=
'
# INIT CODE
\n
{}
\n
#! CCS.BREAKPOINT
\n\n
'
.
format
(
data
[
'
_custom_imports
'
]
)
script
+=
'
# INIT CODE
\n
{}
\n
#! CCS.BREAKPOINT
\n\n
'
.
format
(
data
.
get
(
'
_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
'
]:
comment
=
'
# COMMENT: {}
\n
'
.
format
(
step
[
'
_step_comment
'
]
.
strip
(
))
if
step
[
'
_step_comment
'
]
!=
''
else
''
comment
=
'
# COMMENT: {}
\n
'
.
format
(
replace_newline
(
step
[
'
_step_comment
'
]))
if
step
[
'
_step_comment
'
]
!=
''
else
''
cmd_code
=
step
[
'
_command_code
'
].
strip
()
cmd_code
+=
'
\n
'
if
cmd_code
else
''
...
...
@@ -68,9 +68,9 @@ def run(jfile, outfile, reportfunc=False, specfile=None):
'
# {}
\n
'
\
'
{}
'
\
'
{}
'
\
'
# VERIFICATION: {}
\n
{}{}
\n
#! CCS.BREAKPOINT
\n\n
'
.
format
(
step
[
'
_step_number
'
],
step
[
'
_description
'
]
.
strip
(
),
exec_step
,
'
# VERIFICATION: {}
\n
{}{}
\n
#! CCS.BREAKPOINT
\n\n
'
.
format
(
step
[
'
_step_number
'
],
replace_newline
(
step
[
'
_description
'
]),
exec_step
,
cmd_code
,
step
[
'
_verification_description
'
]
.
strip
(
),
replace_newline
(
step
[
'
_verification_description
'
]),
verif_step
,
# step['_verification_code'].strip(), # Add verification code
comment
)
...
...
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