Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dragoș Haiduc
OpenLDAP
Commits
db8f0de8
Commit
db8f0de8
authored
16 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Patches
Plain Diff
Add an option to run a test in a loop using -l or -loop
parent
46704b72
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/run.in
+33
-10
33 additions, 10 deletions
tests/run.in
with
33 additions
and
10 deletions
tests/run.in
+
33
−
10
View file @
db8f0de8
...
...
@@ -13,7 +13,7 @@
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
USAGE
=
"
$0
[-b <backend>] [-c] [-k] [-p] [-s {ro|rp}] [-u] [-w] <script>"
USAGE
=
"
$0
[-b <backend>] [-c] [-k]
[-l #]
[-p] [-s {ro|rp}] [-u] [-w] <script>"
# configure generated
SRCDIR
=
"@srcdir@"
...
...
@@ -82,6 +82,8 @@ KILLSERVERS=yes
PRESERVE
=
${
PRESERVE
-no
}
SYNCMODE
=
${
SYNCMODE
-rp
}
USERDATA
=
no
LOOP
=
1
COUNTER
=
1
while
test
$#
-gt
0
;
do
case
"
$1
"
in
...
...
@@ -96,6 +98,16 @@ while test $# -gt 0 ; do
-k
|
-kill
)
KILLSERVERS
=
no
shift
;;
-l
|
-loop
)
NUM
=
"
$(
echo
$2
|
sed
's/[0-9]//g'
)
"
if
[
-z
"
$NUM
"
]
;
then
LOOP
=
$2
else
echo
"Loop variable not an int:
$2
"
echo
"
$USAGE
"
;
exit
1
fi
shift
;
shift
;;
-p
|
-preserve
)
PRESERVE
=
yes
...
...
@@ -214,14 +226,25 @@ fi
LDAPNOINIT
=
true
;
export
LDAPNOINIT
echo
"Running
${
SCRIPT
}
..."
$SCRIPT
$*
RC
=
$?
if
test
$CLEAN
=
yes
;
then
echo
"Cleaning up test run directory from this run."
/bin/rm
-rf
${
TESTDIR
}
echo
"Cleaning up symlinks."
/bin/rm
-f
${
DATADIR
}
${
SCHEMADIR
}
fi
while
[
$COUNTER
-le
$LOOP
]
;
do
$SCRIPT
$*
RC
=
$?
if
test
$CLEAN
=
yes
;
then
echo
"Cleaning up test run directory from this run."
/bin/rm
-rf
${
TESTDIR
}
echo
"Cleaning up symlinks."
/bin/rm
-f
${
DATADIR
}
${
SCHEMADIR
}
fi
if
[
$RC
-ne
0
]
;
then
exit
$RC
else
COUNTER
=
`
expr
$COUNTER
+ 1
`
if
[
$COUNTER
-le
$LOOP
]
;
then
echo
"Cleaning up test run directory from this run."
/bin/rm
-rf
${
TESTDIR
}
fi
fi
done
exit
$RC
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