Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
2afeaba8
Commit
2afeaba8
authored
Mar 04, 2016
by
Federico G. Schwindt
Committed by
Lasse Karstensen
Mar 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tidy up
parent
8bb6fa3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
vmodtool.py
lib/libvcc/vmodtool.py
+7
-7
No files found.
lib/libvcc/vmodtool.py
View file @
2afeaba8
...
@@ -843,13 +843,13 @@ class SimpleTestCase(unittest.TestCase):
...
@@ -843,13 +843,13 @@ class SimpleTestCase(unittest.TestCase):
tmpfile
=
mktemp
()
tmpfile
=
mktemp
()
bdir
=
dirname
(
realpath
(
__file__
))
bdir
=
dirname
(
realpath
(
__file__
))
for
inputfile
in
glob
(
join
(
bdir
,
"../libvmod_*/vmod.vcc"
)):
for
inputfile
in
glob
(
join
(
bdir
,
"../libvmod_*/vmod.vcc"
)):
runmain
(
inputfile
,
"."
,
outputprefix
=
tmpfile
)
runmain
(
inputfile
,
"."
,
tmpfile
)
unlink
(
tmpfile
+
".c"
)
unlink
(
tmpfile
+
".c"
)
unlink
(
tmpfile
+
".h"
)
unlink
(
tmpfile
+
".h"
)
#######################################################################
#######################################################################
def
runmain
(
inputvcc
,
rstdir
,
outputprefix
=
"vcc_if"
):
def
runmain
(
inputvcc
,
rstdir
,
outputprefix
):
# Read the file in
# Read the file in
lines
=
[]
lines
=
[]
with
open
(
inputvcc
,
"r"
)
as
fp
:
with
open
(
inputvcc
,
"r"
)
as
fp
:
...
@@ -959,11 +959,11 @@ if __name__ == "__main__":
...
@@ -959,11 +959,11 @@ if __name__ == "__main__":
oparser
=
optparse
.
OptionParser
(
usage
=
usagetext
)
oparser
=
optparse
.
OptionParser
(
usage
=
usagetext
)
oparser
.
add_option
(
'-N'
,
'--strict'
,
action
=
'store_true'
,
default
=
False
,
oparser
.
add_option
(
'-N'
,
'--strict'
,
action
=
'store_true'
,
default
=
False
,
help
=
"Be strict when parsing
input file. (vmod.vcc)
"
)
help
=
"Be strict when parsing
the input file
"
)
oparser
.
add_option
(
'-o'
,
metavar
=
"prefix"
,
default
=
'vcc_if'
,
oparser
.
add_option
(
'-o'
,
'--output'
,
metavar
=
"prefix"
,
default
=
'vcc_if'
,
help
=
'Output file prefix
.
(default: "vcc_if")'
)
help
=
'Output file prefix (default: "vcc_if")'
)
oparser
.
add_option
(
'-w'
,
'--rstdir'
,
metavar
=
"directory"
,
default
=
'.'
,
oparser
.
add_option
(
'-w'
,
'--rstdir'
,
metavar
=
"directory"
,
default
=
'.'
,
help
=
'Where to save
generated RST files.
(default: ".")'
)
help
=
'Where to save
the generated RST files
(default: ".")'
)
oparser
.
add_option
(
''
,
'--runtests'
,
action
=
'store_true'
,
default
=
False
,
oparser
.
add_option
(
''
,
'--runtests'
,
action
=
'store_true'
,
default
=
False
,
dest
=
"runtests"
,
help
=
optparse
.
SUPPRESS_HELP
)
dest
=
"runtests"
,
help
=
optparse
.
SUPPRESS_HELP
)
(
opts
,
args
)
=
oparser
.
parse_args
()
(
opts
,
args
)
=
oparser
.
parse_args
()
...
@@ -986,4 +986,4 @@ if __name__ == "__main__":
...
@@ -986,4 +986,4 @@ if __name__ == "__main__":
oparser
.
print_help
()
oparser
.
print_help
()
exit
(
-
1
)
exit
(
-
1
)
runmain
(
i_vcc
,
opts
.
rstdir
,
o
utputprefix
=
opts
.
o
)
runmain
(
i_vcc
,
opts
.
rstdir
,
o
pts
.
output
)
Write
Preview
Markdown
is supported
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