@@ -204,94 +204,140 @@ test-sqlite\#%: integrations.sqlite.test
204
204
test-sqlite-migration : migrations.sqlite.test
205
205
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./migrations.sqlite.test
206
206
207
- generate-ini :
207
+ generate-ini-mysql :
208
208
sed -e ' s|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \
209
209
-e ' s|{{TEST_MYSQL_DBNAME}}|${TEST_MYSQL_DBNAME}|g' \
210
210
-e ' s|{{TEST_MYSQL_USERNAME}}|${TEST_MYSQL_USERNAME}|g' \
211
211
-e ' s|{{TEST_MYSQL_PASSWORD}}|${TEST_MYSQL_PASSWORD}|g' \
212
212
integrations/mysql.ini.tmpl > integrations/mysql.ini
213
+
214
+ .PHONY : test-mysql
215
+ test-mysql : integrations.mysql.test generate-ini-mysql
216
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test
217
+
218
+ .PHONY : test-mysql\# %
219
+ test-mysql\#% : integrations.mysql.test generate-ini-mysql
220
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $*
221
+
222
+ .PHONY : test-mysql-migration
223
+ test-mysql-migration : migrations.mysql.test generate-ini-mysql
224
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./migrations.mysql.test
225
+
226
+
227
+ generate-ini-mysql8 :
213
228
sed -e ' s|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \
214
229
-e ' s|{{TEST_MYSQL8_DBNAME}}|${TEST_MYSQL8_DBNAME}|g' \
215
230
-e ' s|{{TEST_MYSQL8_USERNAME}}|${TEST_MYSQL8_USERNAME}|g' \
216
231
-e ' s|{{TEST_MYSQL8_PASSWORD}}|${TEST_MYSQL8_PASSWORD}|g' \
217
232
integrations/mysql8.ini.tmpl > integrations/mysql8.ini
233
+
234
+ .PHONY : test-mysql8
235
+ test-mysql8 : integrations.mysql8.test generate-ini-mysql8
236
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test
237
+
238
+ .PHONY : test-mysql8\# %
239
+ test-mysql8\#% : integrations.mysql8.test generate-ini-mysql8
240
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $*
241
+
242
+ .PHONY : test-mysql8-migration
243
+ test-mysql8-migration : migrations.mysql8.test generate-ini-mysql8
244
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8.ini ./migrations.mysql8.test
245
+
246
+
247
+ generate-ini-pgsql :
218
248
sed -e ' s|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \
219
249
-e ' s|{{TEST_PGSQL_DBNAME}}|${TEST_PGSQL_DBNAME}|g' \
220
250
-e ' s|{{TEST_PGSQL_USERNAME}}|${TEST_PGSQL_USERNAME}|g' \
221
251
-e ' s|{{TEST_PGSQL_PASSWORD}}|${TEST_PGSQL_PASSWORD}|g' \
222
252
integrations/pgsql.ini.tmpl > integrations/pgsql.ini
223
- sed -e ' s|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
224
- -e ' s|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \
225
- -e ' s|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
226
- -e ' s|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
227
- integrations/mssql.ini.tmpl > integrations/mssql.ini
228
-
229
- .PHONY : test-mysql
230
- test-mysql : integrations.test generate-ini
231
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.test
232
253
233
- .PHONY : test-mysql-migration
234
- test-mysql-migration : migrations. test generate-ini
235
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql .ini ./migrations .test
254
+ .PHONY : test-pgsql
255
+ test-pgsql : integrations.pgsql. test generate-ini-pgsql
256
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql .ini ./integrations.pgsql .test
236
257
237
- .PHONY : test-mysql8
238
- test-mysql8 : integrations.test generate-ini
239
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8 .ini ./integrations.test
258
+ .PHONY : test-pgsql\ # %
259
+ test-pgsql\# % : integrations.pgsql. test generate-ini-pgsql
260
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql .ini ./integrations.pgsql. test -test.run $*
240
261
241
- .PHONY : test-mysql8 -migration
242
- test-mysql8 -migration : migrations.test generate-ini
243
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql8 .ini ./migrations.test
262
+ .PHONY : test-pgsql -migration
263
+ test-pgsql -migration : migrations.pgsql. test generate-ini-pgsql
264
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql .ini ./migrations.pgsql .test
244
265
245
- .PHONY : test-pgsql
246
- test-pgsql : integrations.test generate-ini
247
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.test
248
266
249
- .PHONY : test-pgsql-migration
250
- test-pgsql-migration : migrations.test generate-ini
251
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./migrations.test
267
+ generate-ini-mssql :
268
+ sed -e ' s|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \
269
+ -e ' s|{{TEST_MSSQL_DBNAME}}|${TEST_MSSQL_DBNAME}|g' \
270
+ -e ' s|{{TEST_MSSQL_USERNAME}}|${TEST_MSSQL_USERNAME}|g' \
271
+ -e ' s|{{TEST_MSSQL_PASSWORD}}|${TEST_MSSQL_PASSWORD}|g' \
272
+ integrations/mssql.ini.tmpl > integrations/mssql.ini
252
273
253
274
.PHONY : test-mssql
254
- test-mssql : integrations.test generate-ini
255
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.test
275
+ test-mssql : integrations.mssql.test generate-ini-mssql
276
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test
277
+
278
+ .PHONY : test-mssql\# %
279
+ test-mssql\#% : integrations.mssql.test generate-ini-mssql
280
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $*
256
281
257
282
.PHONY : test-mssql-migration
258
- test-mssql-migration : migrations.test generate-ini
259
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./migrations.test
283
+ test-mssql-migration : migrations.mssql. test generate-ini-mssql
284
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./migrations.mssql. test
260
285
261
286
262
287
.PHONY : bench-sqlite
263
288
bench-sqlite : integrations.sqlite.test
264
289
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
265
290
266
291
.PHONY : bench-mysql
267
- bench-mysql : integrations.test generate-ini
268
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
292
+ bench-mysql : integrations.mysql. test generate-ini-mysql
293
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.mysql. test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
269
294
270
295
.PHONY : bench-mssql
271
- bench-mssql : integrations.test generate-ini
272
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
296
+ bench-mssql : integrations.mssql. test generate-ini-mssql
297
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mssql.ini ./integrations.mssql. test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
273
298
274
299
.PHONY : bench-pgsql
275
- bench-pgsql : integrations.test generate-ini
276
- GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
300
+ bench-pgsql : integrations.pgsql. test generate-ini-pgsql
301
+ GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql. test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .
277
302
278
303
279
304
.PHONY : integration-test-coverage
280
- integration-test-coverage : integrations.cover.test generate-ini
305
+ integration-test-coverage : integrations.cover.test generate-ini-mysql
281
306
GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
282
307
283
- integrations.test : $(SOURCES )
284
- GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.test
308
+ integrations.mysql.test : $(SOURCES )
309
+ GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql.test
310
+
311
+ integrations.mysql8.test : $(SOURCES )
312
+ GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
313
+
314
+ integrations.pgsql.test : $(SOURCES )
315
+ GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
316
+
317
+ integrations.mssql.test : $(SOURCES )
318
+ GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mssql.test
285
319
286
320
integrations.sqlite.test : $(SOURCES )
287
321
GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags ' sqlite sqlite_unlock_notify'
288
322
289
323
integrations.cover.test : $(SOURCES )
290
324
GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES ) | tr ' ' ',') -o integrations.cover.test
291
325
292
- .PHONY : migrations.test
293
- migrations.test : $(SOURCES )
294
- $(GO ) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.test
326
+ .PHONY : migrations.mysql.test
327
+ migrations.mysql.test : $(SOURCES )
328
+ $(GO ) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql.test
329
+
330
+ .PHONY : migrations.mysql8.test
331
+ migrations.mysql8.test : $(SOURCES )
332
+ $(GO ) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.mysql8.test
333
+
334
+ .PHONY : migrations.pgsql.test
335
+ migrations.pgsql.test : $(SOURCES )
336
+ $(GO ) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.pgsql.test
337
+
338
+ .PHONY : migrations.mssql.test
339
+ migrations.mssql.test : $(SOURCES )
340
+ $(GO ) test -c code.gitea.io/gitea/integrations/migration-test -o migrations.mssql.test
295
341
296
342
.PHONY : migrations.sqlite.test
297
343
migrations.sqlite.test : $(SOURCES )
0 commit comments