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
7723a242
Commit
7723a242
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
setenv support added to allow test cases to require a set of environment
variables
parent
95a4b8db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/FILEFORMAT
+8
-0
8 additions, 0 deletions
tests/FILEFORMAT
tests/runtests.pl
+28
-0
28 additions, 0 deletions
tests/runtests.pl
with
36 additions
and
0 deletions
tests/FILEFORMAT
+
8
−
0
View file @
7723a242
...
...
@@ -66,6 +66,14 @@ in the libtest/ directory.
test case description
</name>
<setenv>
variable1=contents1
variable2=contents2
Set the given environment variables to the specified value before the actual
command is run, they are clear again after the command has been run.
</setenv>
<command [option=no-output]>
command line to run, there's a bunch of %variables that get replaced
accordingly. more about them elsewhere
...
...
This diff is collapsed.
Click to expand it.
tests/runtests.pl
+
28
−
0
View file @
7723a242
...
...
@@ -611,6 +611,29 @@ sub singletest {
writearray
(
$FTPDCMD
,
\
@ftpservercmd
);
}
my
(
@setenv
)
=
getpart
("
client
",
"
setenv
");
my
@envs
;
my
$s
;
for
$s
(
@setenv
)
{
chomp
$s
;
# cut off the newline
subVariables
\
$s
;
print
"
MOO:
$s
\n
";
if
(
$s
=~
/([^=]*)=(.*)/
)
{
my
(
$var
,
$content
)
=
(
$
1
,
$
2
);
$ENV
{
$var
}
=
$content
;
print
"
setenv
$var
to
$content
\n
";
# remember which, so that we can clear them afterwards!
push
@envs
,
$var
;
}
}
# get the command line options to use
my
(
$cmd
,
@blaha
)
=
getpart
("
client
",
"
command
");
...
...
@@ -720,6 +743,11 @@ sub singletest {
# remove the special FTP command file after each test!
unlink
(
$FTPDCMD
);
my
$e
;
for
$e
(
@envs
)
{
$ENV
{
$e
}
=
"";
# clean up
}
my
@err
=
getpart
("
verify
",
"
errorcode
");
my
$errorcode
=
$err
[
0
];
...
...
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