Welcome to mirror list, hosted at ThFree Co, Russian Federation.

autotest.sh - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6863eec032011b27e8b0cc848011617303cd5784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#
# sqlite testing now
#
echo "Setup environment for sqlite testing ..."
DATADIR=data-autotest
rm -rf $DATADIR
mkdir $DATADIR
rm -rf config/config.php
#cp autotest/config.sqlite.php config/autoconfig.php
cat > ./config/autoconfig.php <<DELIM
<?php
\$AUTOCONFIG = array (
  'installed' => false,
  'dbtype' => 'sqlite',
  'dbtableprefix' => 'oc_',
  'datadirectory' => 'data',
  'adminlogin' => 'admin',
  'adminpass' => 'admin',
  'directory' => '$PWD/$DATADIR',
);
DELIM

php -f index.php

#test execution
echo 'Testing with sqlite ...'
cd tests
php -f index.php -- xml > autotest-results-sqlite.xml
cd ..
git checkout tests/data/*

#
# mysql testing now
#
# NOTES:
#  - CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'owncloud';
#  - grant access permissions: grant all on oc_autotest.* to 'oc_autotest'@'localhost';
#
echo "Setup environment for MySql testing ..."
DATADIR=data-autotest
rm -rf $DATADIR
mkdir $DATADIR
rm -rf config/config.php
cat > ./config/autoconfig.php <<DELIM
<?php
\$AUTOCONFIG = array (
  'installed' => false,
  'dbtype' => 'mysql',
  'dbtableprefix' => 'oc_',
  'datadirectory' => 'data',
  'adminlogin' => 'admin',
  'adminpass' => 'admin',
  'directory' => '$PWD/$DATADIR',
  'dbuser' => 'oc_autotest',	
  'dbname' => 'oc_autotest',	
  'dbhost' => 'localhost',
  'dbpass' => 'owncloud',	
);
DELIM

#drop the database
mysql -u oc_autotest -powncloud -e "DROP DATABASE oc_autotest"

#setup
php -f index.php

#test execution
echo 'Testing with MySql ...'
cd tests
php -f index.php -- xml > autotest-results-MySql.xml
cd ..
git checkout tests/data/*

#
# TODO: create config for postgres
#