Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
89d9d4e6
Commit
89d9d4e6
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
better report on why tests are skipped, and also show a count of the amount
of test cases that were "considered".
parent
fe60fc47
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
tests/runtests.pl
+16
-6
16 additions, 6 deletions
tests/runtests.pl
with
16 additions
and
6 deletions
tests/runtests.pl
+
16
−
6
View file @
89d9d4e6
...
...
@@ -559,7 +559,7 @@ sub singletest {
}
$why
=
"
lacks
$f
";
$serverproblem
=
5
;
# set it here
$serverproblem
=
1
5
;
# set it here
last
;
}
...
...
@@ -570,7 +570,6 @@ sub singletest {
if
(
$serverproblem
)
{
# there's a problem with the server, don't run
# this particular server, but count it as "skipped"
my
$why
;
if
(
$serverproblem
==
2
)
{
$why
=
"
server problems
";
}
...
...
@@ -580,6 +579,12 @@ sub singletest {
elsif
(
$serverproblem
==
99
)
{
$why
=
"
bad test
";
}
elsif
(
$serverproblem
==
15
)
{
# set above, a lacking prereq
}
elsif
(
$serverproblem
==
1
)
{
$why
=
"
no SSL-capable server
";
}
else
{
$why
=
"
unfulfilled requirements
";
}
...
...
@@ -963,7 +968,7 @@ sub singletest {
# 100 if this is not a test case
# 99 if this test case has no servers specified
# 2 if one of the required servers couldn't be started
# 1 if this test is skipped due to unfulfilled requirements
# 1 if this test is skipped due to unfulfilled
SSL/stunnel-
requirements
sub
serverfortest
{
my
(
$testnum
)
=
@_
;
...
...
@@ -1232,6 +1237,8 @@ for(keys %run) {
stopserver
(
$run
{
$_
});
# the pid file is in the hash table
}
my
$all
=
$total
+
$skipped
;
if
(
$total
)
{
printf
("
TESTDONE:
$ok
tests out of
$total
reported OK: %d%%
\n
",
$ok
/
$total
*
100
);
...
...
@@ -1243,14 +1250,18 @@ if($total) {
else
{
print
"
TESTFAIL: No tests were performed!
\n
";
}
if
(
$all
)
{
print
"
TESTDONE:
$all
tests were considered.
\n
";
}
if
(
$skipped
)
{
my
$s
=
0
;
print
"
TESTINFO:
$skipped
tests were skipped due to these restraints:
\n
";
for
(
keys
%skipped
)
{
print
"
,
"
if
(
$s
);
my
$r
=
$_
;
printf
"
TESTINFO:
\"
%s
\"
happened
%d times (
",
$r
,
$skipped
{
$_
};
printf
"
TESTINFO:
\"
%s
\"
%d times (
",
$r
,
$skipped
{
$_
};
# now show all test case numbers that had this reason for being
# skipped
...
...
@@ -1264,7 +1275,6 @@ if($skipped) {
}
}
print
"
)
\n
";
$s
++
;
}
}
if
(
$total
&&
(
$ok
!=
$total
))
{
...
...
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