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
053b6720
Commit
053b6720
authored
2 years ago
by
Marko Mecina
Browse files
Options
Downloads
Patches
Plain Diff
modify header info created in TC template generator
parent
b9241ca6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Ccs/tools/gen_tc_templates.py
+4
-4
4 additions, 4 deletions
Ccs/tools/gen_tc_templates.py
with
4 additions
and
4 deletions
Ccs/tools/gen_tc_templates.py
+
4
−
4
View file @
053b6720
...
@@ -9,12 +9,12 @@ import ccs_function_lib as cfl
...
@@ -9,12 +9,12 @@ import ccs_function_lib as cfl
def
export
(
outfile
,
sep
):
def
export
(
outfile
,
sep
):
project
=
cfl
.
project
.
split
(
'
_
'
)[
-
1
]
#
project = cfl.project.split('_')[-1]
mib
=
cfl
.
scoped_session_idb
.
get_bind
().
url
.
database
mib
=
cfl
.
scoped_session_idb
.
get_bind
().
url
.
database
date
=
datetime
.
datetime
.
now
().
strftime
(
'
%Y-%m-%d
'
)
date
=
datetime
.
datetime
.
now
().
strftime
(
'
%Y-%m-%d
'
)
vers
=
'
{}.{}
.{}
'
.
format
(
*
cfl
.
scoped_session_idb
.
execute
(
'
select * from vdf
'
).
fetchall
()[
0
][
2
:])
vers
=
'
{}.{}
'
.
format
(
*
cfl
.
scoped_session_idb
.
execute
(
'
select * from vdf
'
).
fetchall
()[
0
][
3
:])
header
=
'
#
{}
TC templates generated from schema {} (VDF:{})
\n
# Date: {}
\n\n
'
.
format
(
project
,
mib
,
vers
,
date
)
header
=
'
# TC templates generated from schema {} (VDF:{})
\n
# Date: {}
\n\n
'
.
format
(
mib
,
vers
,
date
)
temps
=
[]
temps
=
[]
for
tc
in
cfl
.
get_tc_list
():
for
tc
in
cfl
.
get_tc_list
():
...
@@ -23,7 +23,7 @@ def export(outfile, sep):
...
@@ -23,7 +23,7 @@ def export(outfile, sep):
with
open
(
outfile
,
'
w
'
)
as
fd
:
with
open
(
outfile
,
'
w
'
)
as
fd
:
fd
.
write
(
header
+
sep
.
join
(
temps
))
fd
.
write
(
header
+
sep
.
join
(
temps
))
print
(
'
TC templates exported to {}.
'
.
format
(
outfile
))
print
(
'
TC templates exported
from {}
to {}.
'
.
format
(
mib
,
outfile
))
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
...
...
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