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

build-ci.xml « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d9937e0f149401418c365cd836a9c5d13d203851 (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
78
<project name="piwik" default="all" basedir=".">

	<property file="build.properties" />
	<property file="defaults.properties" />

	<target name="clean">
		<delete dir="${basedir}/results" />
	</target>

	<target name="prepare-build-filesystem" depends="clean">
		<mkdir dir="${basedir}/../tmp/templates_c" />
		<mkdir dir="${basedir}/../tmp/cache" />
		<mkdir dir="${basedir}/../tmp/latest" />
		<mkdir dir="${basedir}/../tmp/sessions" />
        <mkdir dir="${basedir}/../tmp/assets" />
        <mkdir dir="${basedir}/../tests/PHPUnit/Integration/processed" />
		<chmod perm="a+rw">
			<dirset dir="${basedir}/..">
				<include name="config" />
				<include name="tmp" />
                <include name="tmp/**" />
                <include name="tests/PHPUnit/Integration/processed" />
                <include name="tests/lib/geoip-files" />
            </dirset>
		</chmod>
	</target>

	<target name="phpunit">
		<copy file="${basedir}/PHPUnit/phpunit.xml.dist" tofile="${basedir}/PHPUnit/phpunit.xml" overwrite="true">
			<filterset>
				<filtersfile file="${basedir}/build.properties"/>
			</filterset>
		</copy>
	</target>

	<target name="process-build-resources-pdo-mysql" depends="prepare-build-filesystem">
		<copy file="${basedir}/config/pdo_mysql.template.php" tofile="${basedir}/../config/config.ini.php" overwrite="true">
			<filterset>
				<filtersfile file="${basedir}/build.properties"/>
			</filterset>
		</copy>
	</target>

	<target name="test-pdo-mysql" depends="process-build-resources-pdo-mysql">
		<echo>PDO_MYSQL unit tests started</echo>

		<exec executable="phpunit" dir="${basedir}/PHPUnit" failonerror="false" failifexecutionfails="true">
            <!-- DEBUG: when test crash in the middle, enable this to see which test crashes.
                Note: remove \ from -\- below -->
            <!-- <arg line=" -\-testdox"/> -->
		</exec>

		<echo>PDO_MYSQL unit tests finished</echo>
	</target>

	<target name="process-build-resources-mysqli" depends="prepare-build-filesystem">
		<copy file="${basedir}/config/mysqli.template.php" tofile="${basedir}/../config/config.ini.php" overwrite="true">
			<filterset>
				<filtersfile file="${basedir}/build.properties"/>
			</filterset>
		</copy>
	</target>

	<target name="test-mysqli" depends="process-build-resources-mysqli">
		<echo>MYSQLI unit tests started</echo>

		<exec executable="phpunit" dir="${basedir}/PHPUnit" failonerror="false" failifexecutionfails="true">
            <!-- DEBUG: when test crash in the middle, enable this to see which test crashes. Note: Remove \ from -\- below -->
            <!--<arg line="-\-testdox"/>-->
		</exec>

		<echo>MYSQLI unit tests finished</echo>
	</target>

	<target name="all" depends="phpunit,test-pdo-mysql,test-mysqli">
	</target>

</project>