Skip to content

Commit 84286ac

Browse files
committed
Simplify and fix Java UNO API test makefiles
Originally I just wanted to add the juh.jar to the list of jars of the UNO API tests, but this became tedious work, so after the first few files I decided to replace the similiar makefiles with a common define for the *_unoapi* tests. This patch adds two new make defines to be used used by Java UNO and UNO API tests: - gb_JunitTest_set_unoapi_test_defaults - gb_JunitTest_set_unoapi_test_class_and_jars The first one will deduce most defaults from the test name, but still allows to optionally override most settings. If a test doesn't match the default at all, the 2nd define still shares the common jar files and the main Java UNO class, so the second define adds these to your makefile. The real fix is to add juh.jar to gb_JunitTest_use_jars. Change-Id: I4342fdac5e31f85ea18fb4268e13c287a7adc2b7 Reviewed-on: https://gerrit.libreoffice.org/63118 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <[email protected]>
1 parent 5063e7f commit 84286ac

34 files changed

+73
-588
lines changed

chart2/JunitTest_chart2_unoapi.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,chart2_unoapi))
1111

12-
$(eval $(call gb_JunitTest_set_defs,chart2_unoapi,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/chart2/qa/unoapi/sch.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/chart2/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/chart2/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,chart2_unoapi,\
20-
OOoRunner \
21-
ridl \
22-
test \
23-
unoil \
24-
jurt \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,chart2_unoapi,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,chart2_unoapi,,sch.sce))
3013

3114
# vim: set noet sw=4 ts=4:

configmgr/JunitTest_configmgr_unoapi.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,configmgr_unoapi))
1111

12-
$(eval $(call gb_JunitTest_set_defs,configmgr_unoapi,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/configmgr/qa/unoapi/module.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/configmgr/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/configmgr/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,configmgr_unoapi,\
20-
OOoRunner \
21-
ridl \
22-
test \
23-
unoil \
24-
jurt \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,configmgr_unoapi,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,configmgr_unoapi,,module.sce))
3013

3114
# vim: set noet sw=4 ts=4:

connectivity/JunitTest_complex.mk

+2-12
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,17 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,connectivity_complex))
1111

12+
$(eval $(call gb_JunitTest_set_unoapi_test_class_and_jars,connectivity_complex))
13+
1214
$(eval $(call gb_JunitTest_set_defs,connectivity_complex,\
1315
$$(DEFS) \
1416
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/connectivity/qa/scenarios.sce \
1517
))
1618

17-
$(eval $(call gb_JunitTest_use_jars,connectivity_complex,\
18-
jurt \
19-
OOoRunner \
20-
ridl \
21-
test \
22-
unoil \
23-
))
24-
2519
$(eval $(call gb_JunitTest_use_externals,connectivity_complex,\
2620
hsqldb \
2721
))
2822

29-
$(eval $(call gb_JunitTest_add_classes,connectivity_complex,\
30-
org.openoffice.test.UnoApiTest \
31-
))
32-
3323
$(eval $(call gb_JunitTest_add_sourcefiles,connectivity_complex,\
3424
connectivity/qa/complex/connectivity/DBaseDriverTest \
3525
connectivity/qa/complex/connectivity/FlatFileAccess \

dbaccess/JunitTest_dbaccess_unoapi.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,dbaccess_unoapi))
1111

12-
$(eval $(call gb_JunitTest_set_defs,dbaccess_unoapi,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/dbaccess/qa/unoapi/dbaccess.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/dbaccess/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/dbaccess/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,dbaccess_unoapi,\
20-
OOoRunner \
21-
jurt \
22-
ridl \
23-
test \
24-
unoil \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,dbaccess_unoapi,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,dbaccess_unoapi))
3013

3114
# vim: set noet sw=4 ts=4:

extensions/JunitTest_extensions_unoapi.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,extensions_unoapi))
1111

12-
$(eval $(call gb_JunitTest_set_defs,extensions_unoapi,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/extensions/qa/unoapi/extensions.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/extensions/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/extensions/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,extensions_unoapi,\
20-
OOoRunner \
21-
ridl \
22-
test \
23-
unoil \
24-
jurt \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,extensions_unoapi,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,extensions_unoapi))
3013

3114
# vim: set noet sw=4 ts=4:

forms/JunitTest_forms_unoapi_1.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,forms_unoapi_1))
1111

12-
$(eval $(call gb_JunitTest_set_defs,forms_unoapi_1,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_1.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,forms_unoapi_1,\
20-
OOoRunner \
21-
ridl \
22-
test \
23-
unoil \
24-
jurt \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,forms_unoapi_1,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_1))
3013

3114
# vim: set noet sw=4 ts=4:

forms/JunitTest_forms_unoapi_2.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,forms_unoapi_2))
1111

12-
$(eval $(call gb_JunitTest_set_defs,forms_unoapi_2,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_2.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,forms_unoapi_2,\
20-
OOoRunner \
21-
ridl \
22-
test \
23-
unoil \
24-
jurt \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,forms_unoapi_2,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_2))
3013

3114
# vim: set noet sw=4 ts=4:

forms/JunitTest_forms_unoapi_3.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,forms_unoapi_3))
1111

12-
$(eval $(call gb_JunitTest_set_defs,forms_unoapi_3,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_3.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,forms_unoapi_3,\
20-
OOoRunner \
21-
ridl \
22-
test \
23-
unoil \
24-
jurt \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,forms_unoapi_3,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_3))
3013

3114
# vim: set noet sw=4 ts=4:

forms/JunitTest_forms_unoapi_4.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,forms_unoapi_4))
1111

12-
$(eval $(call gb_JunitTest_set_defs,forms_unoapi_4,\
13-
$$(DEFS) \
14-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/forms/qa/unoapi/forms_4.sce \
15-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/forms/qa/unoapi/knownissues.xcl \
16-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/forms/qa/unoapi/testdocuments \
17-
))
18-
19-
$(eval $(call gb_JunitTest_use_jars,forms_unoapi_4,\
20-
OOoRunner \
21-
ridl \
22-
test \
23-
unoil \
24-
jurt \
25-
))
26-
27-
$(eval $(call gb_JunitTest_add_classes,forms_unoapi_4,\
28-
org.openoffice.test.UnoApiTest \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,forms_unoapi_4))
3013

3114
# vim: set noet sw=4 ts=4:

framework/JunitTest_framework_unoapi.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@
1919

2020
$(eval $(call gb_JunitTest_JunitTest,framework_unoapi))
2121

22-
$(eval $(call gb_JunitTest_set_defs,framework_unoapi,\
23-
$$(DEFS) \
24-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/framework/qa/unoapi/framework.sce \
25-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/framework/qa/unoapi/knownissues.xcl \
26-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/framework/qa/unoapi/testdocuments \
27-
))
28-
29-
$(eval $(call gb_JunitTest_use_jars,framework_unoapi,\
30-
OOoRunner \
31-
ridl \
32-
test \
33-
unoil \
34-
jurt \
35-
))
36-
37-
$(eval $(call gb_JunitTest_add_classes,framework_unoapi,\
38-
org.openoffice.test.UnoApiTest \
39-
))
22+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,framework_unoapi))
4023

4124
# vim: set noet sw=4 ts=4:

linguistic/JunitTest_linguistic_unoapi.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@
1919

2020
$(eval $(call gb_JunitTest_JunitTest,linguistic_unoapi))
2121

22-
$(eval $(call gb_JunitTest_set_defs,linguistic_unoapi,\
23-
$$(DEFS) \
24-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/linguistic/qa/unoapi/lng.sce \
25-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/linguistic/qa/unoapi/knownissues.xcl \
26-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/linguistic/qa/unoapi \
27-
))
28-
29-
$(eval $(call gb_JunitTest_use_jars,linguistic_unoapi,\
30-
OOoRunner \
31-
ridl \
32-
test \
33-
unoil \
34-
jurt \
35-
))
36-
37-
$(eval $(call gb_JunitTest_add_classes,linguistic_unoapi,\
38-
org.openoffice.test.UnoApiTest \
39-
))
22+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,linguistic_unoapi,,lng.sce,,.))
4023

4124
# vim: set noet sw=4 ts=4:

sc/JunitTest_sc_unoapi_1.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,sc_unoapi_1))
1111

12-
$(eval $(call gb_JunitTest_add_classes,sc_unoapi_1, \
13-
org.openoffice.test.UnoApiTest \
14-
))
15-
16-
$(eval $(call gb_JunitTest_use_jars,sc_unoapi_1, \
17-
OOoRunner \
18-
jurt \
19-
ridl \
20-
test \
21-
unoil \
22-
))
23-
24-
$(eval $(call gb_JunitTest_set_defs,sc_unoapi_1,\
25-
$$(DEFS) \
26-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_1.sce \
27-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \
28-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_1))
3013

3114
# vim: set noet sw=4 ts=4:

sc/JunitTest_sc_unoapi_2.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,sc_unoapi_2))
1111

12-
$(eval $(call gb_JunitTest_add_classes,sc_unoapi_2, \
13-
org.openoffice.test.UnoApiTest \
14-
))
15-
16-
$(eval $(call gb_JunitTest_use_jars,sc_unoapi_2, \
17-
OOoRunner \
18-
jurt \
19-
ridl \
20-
test \
21-
unoil \
22-
))
23-
24-
$(eval $(call gb_JunitTest_set_defs,sc_unoapi_2,\
25-
$$(DEFS) \
26-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_2.sce \
27-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \
28-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_2))
3013

3114
# vim: set noet sw=4 ts=4:

sc/JunitTest_sc_unoapi_3.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,sc_unoapi_3))
1111

12-
$(eval $(call gb_JunitTest_add_classes,sc_unoapi_3, \
13-
org.openoffice.test.UnoApiTest \
14-
))
15-
16-
$(eval $(call gb_JunitTest_use_jars,sc_unoapi_3, \
17-
OOoRunner \
18-
jurt \
19-
ridl \
20-
test \
21-
unoil \
22-
))
23-
24-
$(eval $(call gb_JunitTest_set_defs,sc_unoapi_3,\
25-
$$(DEFS) \
26-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_3.sce \
27-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \
28-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_3))
3013

3114
# vim: set noet sw=4 ts=4:

sc/JunitTest_sc_unoapi_4.mk

+1-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,6 @@
99

1010
$(eval $(call gb_JunitTest_JunitTest,sc_unoapi_4))
1111

12-
$(eval $(call gb_JunitTest_add_classes,sc_unoapi_4, \
13-
org.openoffice.test.UnoApiTest \
14-
))
15-
16-
$(eval $(call gb_JunitTest_use_jars,sc_unoapi_4, \
17-
OOoRunner \
18-
jurt \
19-
ridl \
20-
test \
21-
unoil \
22-
))
23-
24-
$(eval $(call gb_JunitTest_set_defs,sc_unoapi_4,\
25-
$$(DEFS) \
26-
-Dorg.openoffice.test.arg.sce=$(SRCDIR)/sc/qa/unoapi/sc_4.sce \
27-
-Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/sc/qa/unoapi/testdocuments \
28-
-Dorg.openoffice.test.arg.xcl=$(SRCDIR)/sc/qa/unoapi/knownissues.xcl \
29-
))
12+
$(eval $(call gb_JunitTest_set_unoapi_test_defaults,sc_unoapi_4))
3013

3114
# vim: set noet sw=4 ts=4:

0 commit comments

Comments
 (0)