blob: 3b02122aec7642547378d5c84bf07cf4d7efb195 (
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
|
#!/bin/bash
set -e
# Install XMLStarlet
sudo apt-get install -qq xmlstarlet
# Install fonts for UI tests
if [ "$TEST_DIR" = "UI" ];
then
sudo sh -c "echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections"
sudo apt-get install -qq ttf-mscorefonts-installer
fi
# Copy Piwik configuration
echo "Install config.ini.php"
cp ./tests/PHPUnit/config.ini.travis.php ./config/config.ini.php
# Prepare phpunit.xml
echo "Adjusting phpunit.xml"
cp ./tests/PHPUnit/phpunit.xml.dist ./tests/PHPUnit/phpunit.xml
sed -i 's/@REQUEST_URI@/\//g' ./tests/PHPUnit/phpunit.xml
# If we have a test suite remove code coverage report
if [ -n "$TEST_SUITE" ]
then
xmlstarlet ed -L -d "//phpunit/logging/log[@type='coverage-html']" ./tests/PHPUnit/phpunit.xml
fi
# Create tmp/ sub-directories
mkdir ./tmp/assets
mkdir ./tmp/cache
mkdir ./tmp/latest
mkdir ./tmp/sessions
mkdir ./tmp/templates_c
mkdir ./tmp/tcpdf
chmod a+rw ./tests/lib/geoip-files
|