Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
71818406
Commit
71818406
authored
10 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
Use occ to install ownCloud in autotest.sh
parent
01ea056a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
autotest-external.sh
+5
-65
5 additions, 65 deletions
autotest-external.sh
autotest-hhvm.sh
+11
-65
11 additions, 65 deletions
autotest-hhvm.sh
autotest.sh
+11
-70
11 additions, 70 deletions
autotest.sh
lib/base.php
+1
-1
1 addition, 1 deletion
lib/base.php
with
28 additions
and
201 deletions
autotest-external.sh
+
5
−
65
View file @
71818406
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#
#
# @author Thomas Müller
# @author Thomas Müller
# @author Morris Jobke
# @author Morris Jobke
# @copyright 2012
,
201
3
Thomas Müller thomas.mueller@tmit.eu
# @copyright 2012
-
201
5
Thomas Müller thomas.mueller@tmit.eu
# @copyright 2014 Morris Jobke hey@morrisjobke.de
# @copyright 2014 Morris Jobke hey@morrisjobke.de
#
#
...
@@ -90,67 +90,6 @@ fi
...
@@ -90,67 +90,6 @@ fi
echo
"Using database
$DATABASENAME
"
echo
"Using database
$DATABASENAME
"
# create autoconfig for sqlite, mysql and postgresql
cat
>
./tests/autoconfig-sqlite.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'sqlite',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
);
DELIM
cat
>
./tests/autoconfig-mysql.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'mysql',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASEUSER
',
'dbname' => '
$DATABASENAME
',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
cat
>
./tests/autoconfig-pgsql.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'pgsql',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASEUSER
',
'dbname' => '
$DATABASENAME
',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
cat
>
./tests/autoconfig-oci.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'oci',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASENAME
',
'dbname' => 'XE',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
function
execute_tests
{
function
execute_tests
{
echo
"Setup environment for
$1
testing ..."
echo
"Setup environment for
$1
testing ..."
# back to root folder
# back to root folder
...
@@ -197,15 +136,16 @@ EOF
...
@@ -197,15 +136,16 @@ EOF
to
$DATABASENAME
;
to
$DATABASENAME
;
exit;
exit;
EOF
EOF
DATABASEUSER
=
$DATABASENAME
DATABASENAME
=
'XE'
fi
fi
# copy autoconfig
# copy autoconfig
cp
"
$BASEDIR
/tests/autoconfig-
$1
.php"
"
$BASEDIR
/config/autoconfig.php"
cp
"
$BASEDIR
/tests/autoconfig-
$1
.php"
"
$BASEDIR
/config/autoconfig.php"
# trigger installation
# trigger installation
echo
"INDEX"
echo
"Installing ...."
php
-f
index.php |
grep
-i
-C9999
error
&&
echo
"Error during setup"
&&
exit
101
./occ maintenance:install
--database
=
$1
--database-name
=
$DATABASENAME
--database-host
=
localhost
--database-user
=
$DATABASEUSER
--database-pass
=
owncloud
--database-table-prefix
=
oc_
--admin-user
=
$ADMINLOGIN
--admin-pass
=
admin
--data-dir
=
$DATADIR
echo
"END INDEX"
#test execution
#test execution
echo
"Testing with
$1
..."
echo
"Testing with
$1
..."
...
...
This diff is collapsed.
Click to expand it.
autotest-hhvm.sh
+
11
−
65
View file @
71818406
...
@@ -2,8 +2,14 @@
...
@@ -2,8 +2,14 @@
#
#
# ownCloud
# ownCloud
#
#
# @author Vincent Petry
# @author Morris Jobke
# @author Robin McCorkell
# @author Thomas Müller
# @author Thomas Müller
# @copyright 2012, 2013 Thomas Müller thomas.mueller@tmit.eu
# @author Andreas Fischer
# @author Joas Schilling
# @author Lukas Reschke
# @copyright 2012-2015 Thomas Müller thomas.mueller@tmit.eu
#
#
set
-e
set
-e
...
@@ -95,67 +101,6 @@ fi
...
@@ -95,67 +101,6 @@ fi
echo
"Using database
$DATABASENAME
"
echo
"Using database
$DATABASENAME
"
# create autoconfig for sqlite, mysql and postgresql
cat
>
./tests/autoconfig-sqlite.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'sqlite',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
);
DELIM
cat
>
./tests/autoconfig-mysql.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'mysql',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASEUSER
',
'dbname' => '
$DATABASENAME
',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
cat
>
./tests/autoconfig-pgsql.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'pgsql',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASEUSER
',
'dbname' => '
$DATABASENAME
',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
cat
>
./tests/autoconfig-oci.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'oci',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASENAME
',
'dbname' => 'XE',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
function
execute_tests
{
function
execute_tests
{
echo
"Setup environment for
$1
testing ..."
echo
"Setup environment for
$1
testing ..."
# back to root folder
# back to root folder
...
@@ -202,15 +147,16 @@ EOF
...
@@ -202,15 +147,16 @@ EOF
to
$DATABASENAME
;
to
$DATABASENAME
;
exit;
exit;
EOF
EOF
DATABASEUSER
=
$DATABASENAME
DATABASENAME
=
'XE'
fi
fi
# copy autoconfig
# copy autoconfig
cp
"
$BASEDIR
/tests/autoconfig-
$1
.php"
"
$BASEDIR
/config/autoconfig.php"
cp
"
$BASEDIR
/tests/autoconfig-
$1
.php"
"
$BASEDIR
/config/autoconfig.php"
# trigger installation
# trigger installation
echo
"INDEX"
echo
"Installing ...."
hhvm
-f
index.php |
grep
-i
-C9999
error
&&
echo
"Error during setup"
&&
exit
101
hhvm ./occ maintenance:install
--database
=
$1
--database-name
=
$DATABASENAME
--database-host
=
localhost
--database-user
=
$DATABASEUSER
--database-pass
=
owncloud
--database-table-prefix
=
oc_
--admin-user
=
$ADMINLOGIN
--admin-pass
=
admin
--data-dir
=
$DATADIR
echo
"END INDEX"
#test execution
#test execution
echo
"Testing with
$1
..."
echo
"Testing with
$1
..."
...
...
This diff is collapsed.
Click to expand it.
autotest.sh
+
11
−
70
View file @
71818406
...
@@ -2,8 +2,14 @@
...
@@ -2,8 +2,14 @@
#
#
# ownCloud
# ownCloud
#
#
# @author Vincent Petry
# @author Morris Jobke
# @author Robin McCorkell
# @author Thomas Müller
# @author Thomas Müller
# @copyright 2012, 2013 Thomas Müller thomas.mueller@tmit.eu
# @author Andreas Fischer
# @author Joas Schilling
# @author Lukas Reschke
# @copyright 2012-2015 Thomas Müller thomas.mueller@tmit.eu
#
#
set
-e
set
-e
...
@@ -89,67 +95,6 @@ fi
...
@@ -89,67 +95,6 @@ fi
echo
"Using database
$DATABASENAME
"
echo
"Using database
$DATABASENAME
"
# create autoconfig for sqlite, mysql and postgresql
cat
>
./tests/autoconfig-sqlite.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'sqlite',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
);
DELIM
cat
>
./tests/autoconfig-mysql.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'mysql',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASEUSER
',
'dbname' => '
$DATABASENAME
',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
cat
>
./tests/autoconfig-pgsql.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'pgsql',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASEUSER
',
'dbname' => '
$DATABASENAME
',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
cat
>
./tests/autoconfig-oci.php
<<
DELIM
<?php
\$
AUTOCONFIG = array (
'installed' => false,
'dbtype' => 'oci',
'dbtableprefix' => 'oc_',
'adminlogin' => '
$ADMINLOGIN
',
'adminpass' => 'admin',
'directory' => '
$DATADIR
',
'dbuser' => '
$DATABASENAME
',
'dbname' => 'XE',
'dbhost' => 'localhost',
'dbpass' => 'owncloud',
);
DELIM
function
execute_tests
{
function
execute_tests
{
echo
"Setup environment for
$1
testing ..."
echo
"Setup environment for
$1
testing ..."
# back to root folder
# back to root folder
...
@@ -162,8 +107,6 @@ function execute_tests {
...
@@ -162,8 +107,6 @@ function execute_tests {
rm
-rf
"
$DATADIR
"
rm
-rf
"
$DATADIR
"
mkdir
"
$DATADIR
"
mkdir
"
$DATADIR
"
# remove the old config file
#rm -rf config/config.php
cp
tests/preseed-config.php config/config.php
cp
tests/preseed-config.php config/config.php
# drop database
# drop database
...
@@ -196,15 +139,13 @@ EOF
...
@@ -196,15 +139,13 @@ EOF
to
$DATABASENAME
;
to
$DATABASENAME
;
exit;
exit;
EOF
EOF
DATABASEUSER
=
$DATABASENAME
DATABASENAME
=
'XE'
fi
fi
# copy autoconfig
cp
"
$BASEDIR
/tests/autoconfig-
$1
.php"
"
$BASEDIR
/config/autoconfig.php"
# trigger installation
# trigger installation
echo
"INDEX"
echo
"Installing ...."
php
-f
index.php |
grep
-i
-C9999
error
&&
echo
"Error during setup"
&&
exit
101
./occ maintenance:install
--database
=
$1
--database-name
=
$DATABASENAME
--database-host
=
localhost
--database-user
=
$DATABASEUSER
--database-pass
=
owncloud
--database-table-prefix
=
oc_
--admin-user
=
$ADMINLOGIN
--admin-pass
=
admin
--data-dir
=
$DATADIR
echo
"END INDEX"
#test execution
#test execution
echo
"Testing with
$1
..."
echo
"Testing with
$1
..."
...
...
This diff is collapsed.
Click to expand it.
lib/base.php
+
1
−
1
View file @
71818406
...
@@ -566,7 +566,7 @@ class OC {
...
@@ -566,7 +566,7 @@ class OC {
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
echo
(
'Writing to database failed'
);
echo
(
'Writing to database failed'
);
}
}
exit
();
exit
(
1
);
}
else
{
}
else
{
OC_Response
::
setStatus
(
OC_Response
::
STATUS_SERVICE_UNAVAILABLE
);
OC_Response
::
setStatus
(
OC_Response
::
STATUS_SERVICE_UNAVAILABLE
);
OC_Template
::
printGuestPage
(
''
,
'error'
,
array
(
'errors'
=>
$errors
));
OC_Template
::
printGuestPage
(
''
,
'error'
,
array
(
'errors'
=>
$errors
));
...
...
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