Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
die_coolen_jungs
our_own_cloud_project
Commits
a50e215c
Commit
a50e215c
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #5537 from owncloud/autotest-syntaxhelp
Added syntax help for autotest.sh
parents
119ecc6f
7de1b3f2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
autotest.sh
+30
-4
30 additions, 4 deletions
autotest.sh
with
30 additions
and
4 deletions
autotest.sh
+
30
−
4
View file @
a50e215c
...
...
@@ -12,11 +12,37 @@ DATABASEUSER=oc_autotest$EXECUTOR_NUMBER
ADMINLOGIN
=
admin
$EXECUTOR_NUMBER
BASEDIR
=
$PWD
DBCONFIGS
=
"sqlite mysql pgsql oci"
function
print_syntax
{
echo
-e
"Syntax: ./autotest.sh [dbconfigname] [testfile]
\n
"
>
&2
echo
-e
"
\t\"
dbconfigname
\"
can be one of:
$DBCONFIGS
"
>
&2
echo
-e
"
\t\"
testfile
\"
is the name of a test file, for example lib/template.php"
>
&2
echo
-e
"
\n
Example: ./autotest.sh sqlite lib/template.php"
>
&2
echo
"will run the test suite from
\"
tests/lib/template.php
\"
"
>
&2
echo
-e
"
\n
If no arguments are specified, all tests will be run with all database configs"
>
&2
}
if
!
[
-w
config
-a
-w
config/config.php
]
;
then
echo
"Please enable write permissions on config and config/config.php"
>
&2
exit
1
fi
if
[
$1
]
;
then
FOUND
=
0
for
DBCONFIG
in
$DBCONFIGS
;
do
if
[
$1
=
$DBCONFIG
]
;
then
FOUND
=
1
break
fi
done
if
[
$FOUND
=
0
]
;
then
echo
-e
"Unknown database config name
\"
$1
\"\n
"
>
&2
print_syntax
exit
2
fi
fi
# Back up existing (dev) config if one exists
if
[
-f
config/config.php
]
;
then
mv
config/config.php config/config-autotest-backup.php
...
...
@@ -160,10 +186,10 @@ EOF
#
if
[
-z
"
$1
"
]
then
execute_tests
'sqlite'
execute_tests
'mysql'
execute_tests
'pgsql'
execute_tests
'oci'
# run all known database configs
for
DBCONFIG
in
$DBCONFIGS
;
do
execute_tests
$DBCONFIG
done
else
execute_tests
$1
$2
$3
fi
...
...
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