@@ -169,39 +169,41 @@ test-vendor:
169
169
test-sqlite : integrations.sqlite.test
170
170
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test
171
171
172
- .PHONY : test-mysql
173
- test-mysql : integrations.mysql.test
172
+ generate-ini :
174
173
sed -e ' s|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \
175
- -e ' s|{{TEST_MYSQL_DBNAME}}|${TEST_MYSQL_DBNAME}|g' \
176
- -e ' s|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
177
- -e ' s|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
178
- integrations/mysql.ini.tmpl > integrations/mysql.ini
174
+ -e ' s|{{TEST_MYSQL_DBNAME}}|${TEST_MYSQL_DBNAME}|g' \
175
+ -e ' s|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
176
+ -e ' s|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
177
+ integrations/mysql.ini.tmpl > integrations/mysql.ini
178
+ sed -e ' s|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
179
+ -e ' s|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
180
+ -e ' s|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
181
+ -e ' s|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
182
+ integrations/pgsql.ini.tmpl > integrations/pgsql.ini
183
+
184
+ .PHONY : test-mysql
185
+ test-mysql : integrations.mysql.test generate-ini
179
186
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test
180
187
181
188
.PHONY : test-pgsql
182
- test-pgsql : integrations.pgsql.test
183
- sed -e ' s|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
184
- -e ' s|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
185
- -e ' s|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
186
- -e ' s|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
187
- integrations/pgsql.ini.tmpl > integrations/pgsql.ini
189
+ test-pgsql : integrations.pgsql.test generate-ini
188
190
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test
189
191
190
192
.PHONY : bench-sqlite
191
193
bench-sqlite : integrations.sqlite.test
192
194
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.bench .
193
195
194
196
.PHONY : bench-mysql
195
- bench-mysql : integrations.mysql.test
197
+ bench-mysql : integrations.mysql.test generate-ini
196
198
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.bench .
197
199
198
200
.PHONY : bench-pgsql
199
- bench-pgsql : integrations.pgsql.test
201
+ bench-pgsql : integrations.pgsql.test generate-ini
200
202
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.bench .
201
203
202
204
203
205
.PHONY : integration-test-coverage
204
- integration-test-coverage : integrations.cover.test
206
+ integration-test-coverage : integrations.cover.test generate-ini
205
207
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
206
208
207
209
integrations.mysql.test : $(SOURCES )
0 commit comments