vendor/doctrine/run-all.sh
author cavaliet
Mon, 20 Feb 2012 11:55:52 +0100
changeset 69 7c3b7896e4d2
parent 0 7f95f8617b0b
permissions -rwxr-xr-x
merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
#!/bin/bash
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
# This script is a small convenience wrapper for running the doctrine testsuite against a large bunch of databases.
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
# Just create the phpunit.xmls as described in the array below and configure the specific files <php /> section
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
# to connect to that database. Just omit a file if you dont have that database and the tests will be skipped.
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
configs[1]="mysql.phpunit.xml" 
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
configs[2]='postgres.phpunit.xml' 
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
configs[3]='sqlite.phpunit.xml'
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
configs[4]='oracle.phpunit.xml'
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
configs[5]='db2.phpunit.xml'
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
configs[6]='pdo-ibm.phpunit.xml'
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
configs[7]='sqlsrv.phpunit.xml'
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
for i in "${configs[@]}"; do
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    if [ -f "$i" ];
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
    then
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
        echo "RUNNING TESTS WITH CONFIG $i"
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
        phpunit -c "$i" "$@" 
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    fi;
7f95f8617b0b first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
done