Skip to content
This repository
Browse code

refs #3445 - migrate Piwik CI job

git-svn-id: http://dev.piwik.org/svn/trunk@7459 59fd770c-687e-43c8-a1e3-f5a4ff64c105
  • Loading branch information...
commit 87dc7092b46b3b1377b8032bd632fb78034e282b 1 parent 9ad72b7
Anthon Pang robocoder authored
2  tests/PHPUnit/phpunit.xml.dist
@@ -20,7 +20,7 @@
20 20
21 21 <php>
22 22 <server name="HTTP_HOST" value="localhost"/>
23   - <server name="REQUEST_URI" value="/trunk/tests/all_tests.php"/>
  23 + <server name="REQUEST_URI" value="@REQUEST_URI@"/>
24 24 <server name="REMOTE_ADDR" value="127.0.0.1"/>
25 25 </php>
26 26
71 tests/build-ci.xml
@@ -23,6 +23,14 @@
23 23 </chmod>
24 24 </target>
25 25
  26 + <target name="phpunit">
  27 + <copy file="${basedir}/PHPUnit/phpunit.xml.dist" tofile="${basedir}/PHPUnit/phpunit.xml" overwrite="true">
  28 + <filterset>
  29 + <filtersfile file="${basedir}/build.properties"/>
  30 + </filterset>
  31 + </copy>
  32 + </target>
  33 +
26 34 <target name="process-build-resources-pdo-mysql" depends="prepare-build-filesystem">
27 35 <copy file="${basedir}/config/pdo_mysql.template.php" tofile="${basedir}/../config/config.ini.php" overwrite="true">
28 36 <filterset>
@@ -34,19 +42,10 @@
34 42 <target name="test-pdo-mysql" depends="process-build-resources-pdo-mysql">
35 43 <echo>PDO_MYSQL unit tests started</echo>
36 44
37   - <mkdir dir="${basedir}/integration/processed"/>
38   - <exec executable="${php.executable}" dir="${basedir}" failonerror="false" resultproperty="result-pdo-mysql" failifexecutionfails="true">
39   - <arg value="all_tests.php" />
  45 + <exec executable="phpunit" dir="${basedir}/PHPUnit" failonerror="true" failifexecutionfails="true">
40 46 </exec>
41   - <move file="${basedir}/integration/processed" tofile="${basedir}/integration/processed-pdo-mysql" />
42 47
43 48 <echo>PDO_MYSQL unit tests finished</echo>
44   -
45   - <fail>
46   - <condition>
47   - <isfailure code="${result-pdo-mysql}"/>
48   - </condition>
49   - </fail>
50 49 </target>
51 50
52 51 <target name="process-build-resources-mysqli" depends="prepare-build-filesystem">
@@ -60,61 +59,13 @@
60 59 <target name="test-mysqli" depends="process-build-resources-mysqli">
61 60 <echo>MYSQLI unit tests started</echo>
62 61
63   - <mkdir dir="${basedir}/integration/processed"/>
64   - <exec executable="${php.executable}" dir="${basedir}" failonerror="false" resultproperty="result-mysqli" failifexecutionfails="true">
65   - <arg value="all_tests.php" />
  62 + <exec executable="phpunit" dir="${basedir}/PHPUnit" failonerror="true" failifexecutionfails="true">
66 63 </exec>
67   - <move file="${basedir}/integration/processed" tofile="${basedir}/integration/processed-mysqli" />
68 64
69 65 <echo>MYSQLI unit tests finished</echo>
70   -
71   - <fail>
72   - <condition>
73   - <isfailure code="${result-mysqli}"/>
74   - </condition>
75   - </fail>
76   - </target>
77   -
78   - <target name="webtest" depends="prepare-build-filesystem">
79   - <mkdir dir="${basedir}/integration/processed"/>
80   - <delete file="${basedir}/../config/config.ini.php"/>
81   - <ant antfile="${basedir}/build-webtest.xml">
82   - </ant>
83   - </target>
84   -
85   - <target name="schemaspy">
86   - <echo>SchemaSpy started</echo>
87   -
88   - <delete dir="${basedir}/../schemaspy-report"/>
89   - <mkdir dir="${basedir}/../schemaspy-report"/>
90   -
91   - <java jar="${basedir}/lib/java/schemaSpy_5.0.0.jar" fork="true" failonerror="false" resultproperty="result-schemaspy" maxmemory="256m" dir="${basedir}">
92   - <arg value="-t"/>
93   - <arg value="mysql"/>
94   - <arg value="-host"/>
95   - <arg value="${database.main.host}:${database.main.port}"/>
96   - <arg value="-db"/>
97   - <arg value="${database.main.name}"/>
98   - <arg value="-dp"/>
99   - <arg path="${basedir}/lib/java/mysql-connector-java-5.1.7.jar"/>
100   - <arg value="-u"/>
101   - <arg value="${database.main.username}"/>
102   - <arg value="-o"/>
103   - <arg path="${basedir}/../schemaspy-report"/>
104   - <arg value="-p"/>
105   - <arg value="${database.main.password}"/>
106   - </java>
107   -
108   - <echo>SchemaSpy finished</echo>
109   -
110   - <fail>
111   - <condition>
112   - <isfailure code="${result-schemaspy}"/>
113   - </condition>
114   - </fail>
115 66 </target>
116 67
117   - <target name="all" depends="test-pdo-mysql,test-mysqli,webtest,schemaspy">
  68 + <target name="all" depends="phpunit,test-pdo-mysql,test-mysqli">
118 69 </target>
119 70
120 71 </project>
32 tests/build-docs.xml
@@ -22,6 +22,38 @@
22 22 <echo>phpDocumentor finished</echo>
23 23 </target>
24 24
  25 + <target name="schemaspy">
  26 + <echo>SchemaSpy started</echo>
  27 +
  28 + <delete dir="${basedir}/../schemaspy-report"/>
  29 + <mkdir dir="${basedir}/../schemaspy-report"/>
  30 +
  31 + <java jar="${basedir}/lib/java/schemaSpy_5.0.0.jar" fork="true" failonerror="false" resultproperty="result-schemaspy" maxmemory="256m" dir="${basedir}">
  32 + <arg value="-t"/>
  33 + <arg value="mysql"/>
  34 + <arg value="-host"/>
  35 + <arg value="${database.main.host}:${database.main.port}"/>
  36 + <arg value="-db"/>
  37 + <arg value="${database.main.name}"/>
  38 + <arg value="-dp"/>
  39 + <arg path="${basedir}/lib/java/mysql-connector-java-5.1.7.jar"/>
  40 + <arg value="-u"/>
  41 + <arg value="${database.main.username}"/>
  42 + <arg value="-o"/>
  43 + <arg path="${basedir}/../schemaspy-report"/>
  44 + <arg value="-p"/>
  45 + <arg value="${database.main.password}"/>
  46 + </java>
  47 +
  48 + <echo>SchemaSpy finished</echo>
  49 +
  50 + <fail>
  51 + <condition>
  52 + <isfailure code="${result-schemaspy}"/>
  53 + </condition>
  54 + </fail>
  55 + </target>
  56 +
25 57 <target name="all">
26 58 <antcall target="phpdoc"/>
27 59 </target>
2  tests/config/mysqli.template.php
@@ -5,7 +5,7 @@
5 5 ; the config.ini.php file contains information about the super user and the database access
6 6
7 7 [superuser]
8   -login= @superuser.loging@
  8 +login= @superuser.login@
9 9 password= @superuser.password@
10 10 email= @superuser.email@
11 11 salt=f0cf9c5b0d542272ff20ddfb4a646686
2  tests/config/pdo_mysql.template.php
@@ -5,7 +5,7 @@
5 5 ; the config.ini.php file contains information about the super user and the database access
6 6
7 7 [superuser]
8   -login= @superuser.loging@
  8 +login= @superuser.login@
9 9 password= @superuser.password@
10 10 email= @superuser.email@
11 11 salt=f0cf9c5b0d542272ff20ddfb4a646686

0 comments on commit 87dc709

Please sign in to comment.
Something went wrong with that request. Please try again.