add junit subsequentcheck as autopkgtest
[pkg-openoffice/libreoffice.git] / tests / patches / java-subsequentcheck-standalone.diff
1 From 4224d61427370149e9a9f5bd20cd9549e535398f Mon Sep 17 00:00:00 2001
2 From: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
3 Date: Tue, 30 Oct 2012 15:37:35 +0100
4 Subject: [PATCH] run subsequentcheck standalone against installed version as
5  integration test
6 Forwarded: partially, where there is generic use for it
7
8 ---
9  dbaccess/Module_dbaccess.mk                |  1 -
10  jurt/Module_jurt.mk                        |  2 +-
11  ridljar/JunitTest_util.mk                  |  2 +-
12  solenv/gbuild/JavaClassSet.mk              |  2 +-
13  solenv/gbuild/JunitTest.mk                 |  2 +-
14  solenv/gbuild/Module.mk                    |  3 +++
15  solenv/gbuild/extensions/post_SkipBuild.mk | 17 +++++++++++++++++
16  solenv/gbuild/platform/unxgcc.mk           |  2 +-
17  8 files changed, 25 insertions(+), 6 deletions(-)
18  create mode 100644 solenv/gbuild/extensions/post_SkipBuild.mk
19
20 diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk
21 index f087ba8..1ee0bd6 100644
22 --- a/dbaccess/Module_dbaccess.mk
23 +++ b/dbaccess/Module_dbaccess.mk
24 @@ -54,7 +54,6 @@ $(eval $(call gb_Module_add_check_targets,dbaccess,\
25  
26  
27  $(eval $(call gb_Module_add_subsequentcheck_targets,dbaccess,\
28 -       JunitTest_dbaccess_complex \
29      JunitTest_dbaccess_unoapi \
30  ))
31  
32 diff --git a/jurt/Module_jurt.mk b/jurt/Module_jurt.mk
33 index e367b6f..2b73ce3 100644
34 --- a/jurt/Module_jurt.mk
35 +++ b/jurt/Module_jurt.mk
36 @@ -48,7 +48,7 @@ $(eval $(call gb_Module_add_targets,jurt,\
37  ))
38  endif
39  
40 -$(eval $(call gb_Module_add_subsequentcheck_targets,jurt,\
41 +#$(eval $(call gb_Module_add_subsequentcheck_targets,jurt,\
42      CustomTarget_test_urp \
43      InternalUnoApi_test_urp \
44      JunitTest_bridgefactory \
45 diff --git a/ridljar/JunitTest_util.mk b/ridljar/JunitTest_util.mk
46 index e29a65b..da374a7 100644
47 --- a/ridljar/JunitTest_util.mk
48 +++ b/ridljar/JunitTest_util.mk
49 @@ -28,7 +28,7 @@
50  $(eval $(call gb_JunitTest_JunitTest,ridljar_util))
51  
52  $(eval $(call gb_JunitTest_use_jars,ridljar_util,\
53 -    OOoRunnerLight \
54 +    OOoRunner \
55      ridl \
56  ))
57  
58 diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
59 index fab3ae4..1b581a7 100644
60 --- a/solenv/gbuild/JavaClassSet.mk
61 +++ b/solenv/gbuild/JavaClassSet.mk
62 @@ -47,7 +47,7 @@ $(call gb_Helper_abbreviate_dirs,\
63                         $(filter-out $(JARDEPS),$(4))) && \
64                 $(if $(3),$(gb_JavaClassSet_JAVACCOMMAND) \
65                         $(gb_JavaClassSet_JAVACDEBUG) \
66 -                       -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
67 +                       -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2)):$(subst $(gb_SPACE),:,$(wildcard /usr/lib/ure/share/java/*.jar)):$(subst $(gb_SPACE),:,$(wildcard /usr/lib/libreoffice/program/classes/*.jar))" \
68                         -d $(call gb_JavaClassSet_get_classdir,$(2)) \
69                         @$$RESPONSEFILE &&) \
70                 rm -f $$RESPONSEFILE &&) \
71 diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
72 index 6ed1f77..716d966 100644
73 --- a/solenv/gbuild/JunitTest.mk
74 +++ b/solenv/gbuild/JunitTest.mk
75 @@ -67,7 +67,7 @@ $(call gb_JunitTest_get_target,%) :
76         $(CLEAN_CMD)
77  
78  define gb_JunitTest_JunitTest
79 -$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$$(gb_CLASSPATHSEP)$(OUTDIR)/lib
80 +$(call gb_JunitTest_get_target,$(1)) : T_CP := $(call gb_JavaClassSet_get_classdir,$(call gb_JunitTest_get_classsetname,$(1)))$$(gb_CLASSPATHSEP)$(OOO_JUNIT_JAR)$$(gb_CLASSPATHSEP)$(OUTDIR)/lib:$(subst $(gb_SPACE),:,$(wildcard /usr/lib/ure/share/java/*.jar)):$(subst $(gb_SPACE),:,$(wildcard /usr/lib/libreoffice/program/classes/*.jar))
81  $(call gb_JunitTest_get_target,$(1)) : CLASSES :=
82  $(eval $(call gb_JunitTest_JunitTest_platform,$(1)))
83  
84 diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
85 index 97f1a81..095212b 100644
86 --- a/solenv/gbuild/Module.mk
87 +++ b/solenv/gbuild/Module.mk
88 @@ -255,11 +255,14 @@ endef
89  endif # SKIP_TESTS
90  
91  define gb_Module_add_subsequentcheck_target
92 +ifeq (,$(filter-out JavaClassSet% JunitTest%,$(2)))
93  $(call gb_Module__read_targetfile,$(1),$(2),subsequentcheck target)
94  
95  $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
96  $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
97  
98 +endif
99 +
100  endef
101  endif
102  
103 diff --git a/solenv/gbuild/extensions/post_SkipBuild.mk b/solenv/gbuild/extensions/post_SkipBuild.mk
104 new file mode 100644
105 index 0000000..661d638
106 --- /dev/null
107 +++ b/solenv/gbuild/extensions/post_SkipBuild.mk
108 @@ -0,0 +1,17 @@
109 +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
110 +#
111 +# This file is part of the LibreOffice project.
112 +#
113 +# This Source Code Form is subject to the terms of the Mozilla Public
114 +# License, v. 2.0. If a copy of the MPL was not distributed with this
115 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
116 +#
117 +
118 +# we dont want to bother with these for integration tests
119 +gb_Module_add_target =
120 +gb_Module_add_check_target =
121 +gb_Module_add_slowcheck_target =
122 +gb_JavaClassSet_use_jar =
123 +gb_JunitTest_use_jar =
124 +
125 +# vim: set noet sw=4 ts=4:
126 diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
127 index 53d51ac..0b88221 100644
128 --- a/solenv/gbuild/platform/unxgcc.mk
129 +++ b/solenv/gbuild/platform/unxgcc.mk
130 @@ -339,7 +339,7 @@ endef
131  # JunitTest class
132  
133  ifneq ($(OOO_TEST_SOFFICE),)
134 -gb_JunitTest_SOFFICEARG:=$(OOO_TEST_SOFFICE) 
135 +gb_JunitTest_SOFFICEARG:=$(OOO_TEST_SOFFICE)
136  else
137  ifneq ($(gb_JunitTest_DEBUGRUN),)
138  gb_JunitTest_SOFFICEARG:=connect:pipe,name=$(USER)
139 -- 
140 1.8.1.2
141