Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
79811875
Commit
79811875
authored
Dec 15, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the regression tests independent of local time zone in which they are run
parent
add7c855
Pipeline
#100
skipped
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
README.rst
README.rst
+4
-0
regress.sh
src/test/regress.sh
+5
-1
vslarg.sh
src/test/vslarg.sh
+9
-5
No files found.
README.rst
View file @
79811875
...
...
@@ -372,6 +372,10 @@ reproduces the same value that was present in the log, while
varnishncsa performs floating point conversions, with some loss of
precision.
The date/time formatters ``%t`` and ``%{X}t`` assume the local time
zone, as set in varnishevent's environment. You can control the output
by setting the ``TZ`` environment variable.
REQUIREMENTS
============
...
...
src/test/regress.sh
View file @
79811875
...
...
@@ -4,6 +4,10 @@ echo
echo
"TEST:
$0
"
echo
'... testing output and log against known checksums'
# Ensure that the local time date formatters produce the same output
# wherever the test is run.
export
TZ
=
UTC
LOG
=
test.log
OUT
=
output.log
...
...
@@ -12,7 +16,7 @@ rm -f $LOG $OUT
../varnishevent
-f
varnishevent.conf
-r
varnish-4.1.0-doc.log
-w
$OUT
-v
CKSUM
=
$(
cksum
$OUT
)
if
[
"
$CKSUM
"
!=
"
1046111307
442153
$OUT
"
]
;
then
if
[
"
$CKSUM
"
!=
"
54743924
442153
$OUT
"
]
;
then
echo
"ERROR: Regression test log output incorrect cksum:
$CKSUM
"
exit
1
fi
...
...
src/test/vslarg.sh
View file @
79811875
...
...
@@ -8,10 +8,14 @@ IN=varnish-4.1.0-doc.log
CONF
=
varnishevent.conf
LOG
=
/dev/null
# Ensure that the local time date formatters produce the same output
# wherever the test is run.
export
TZ
=
UTC
echo
"... no VSL args"
CKSUM
=
$(
../varnishevent
-r
${
IN
}
-f
${
CONF
}
-l
${
LOG
}
|
cksum
)
if
[
"
$CKSUM
"
!=
'2
861633151
442191'
]
;
then
if
[
"
$CKSUM
"
!=
'2
542287168
442191'
]
;
then
echo
"ERROR: no VSL args unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
@@ -20,7 +24,7 @@ echo "... -g vxid"
CKSUM
=
$(
../varnishevent
-g
vxid
-r
${
IN
}
-f
${
CONF
}
-l
${
LOG
}
|
cksum
)
# Same as default (no -g arg)
if
[
"
$CKSUM
"
!=
'2
861633151
442191'
]
;
then
if
[
"
$CKSUM
"
!=
'2
542287168
442191'
]
;
then
echo
"ERROR: -g vxid unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
@@ -28,7 +32,7 @@ fi
echo
"... -g request"
CKSUM
=
$(
../varnishevent
-g
request
-r
${
IN
}
-f
${
CONF
}
-l
${
LOG
}
|
cksum
)
if
[
"
$CKSUM
"
!=
'
519771253
443186'
]
;
then
if
[
"
$CKSUM
"
!=
'
3970366484
443186'
]
;
then
echo
"ERROR: -g request unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
@@ -64,7 +68,7 @@ fi
echo
"... -q query"
CKSUM
=
$(
../varnishevent
-q
'ReqURL ~ "_static"'
-r
${
IN
}
-l
${
LOG
}
|
cksum
)
if
[
"
$CKSUM
"
!=
'
3256944209
830'
]
;
then
if
[
"
$CKSUM
"
!=
'
805680033
830'
]
;
then
echo
"ERROR: -q query unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
@@ -79,7 +83,7 @@ fi
echo
"... -C"
CKSUM
=
$(
../varnishevent
-C
-q
'ReqURL ~ "_STATIC"'
-r
${
IN
}
-l
${
LOG
}
|
cksum
)
if
[
"
$CKSUM
"
!=
'
3256944209
830'
]
;
then
if
[
"
$CKSUM
"
!=
'
805680033
830'
]
;
then
echo
"ERROR: -q query unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
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