[Libreoffice-commits] .: 3 commits - Makefile.in solenv/gbuild unotest/source
Bjoern Michaelsen
bmichaelsen at kemper.freedesktop.org
Fri Nov 25 06:15:04 PST 2011
Makefile.in | 7 ++
solenv/gbuild/JunitTest.mk | 14 +++--
solenv/gbuild/Module.mk | 10 +++
solenv/gbuild/gbuild.mk | 4 +
solenv/gbuild/platform/unxgcc.mk | 26 +++++++++-
unotest/source/java/org/openoffice/test/OfficeConnection.java | 6 --
6 files changed, 53 insertions(+), 14 deletions(-)
New commits:
commit bb149de2b4d3458c0db1958edbbb75e79a8a53c4
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Nov 25 15:14:09 2011 +0100
some hints cleanup
diff --git a/Makefile.in b/Makefile.in
index 9f58d33..443305b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -46,13 +46,18 @@ dev-install: build
printf \
'\nDeveloper installation finished, you can now execute:\n\n' \
&& \
- if test `uname -s` = Darwin; then \
+ if test `uname -s` = Linux; then \
+ printf 'make debugrun\n'; \
+ elif test `uname -s` = Darwin; then \
printf 'open %s/install/LibreOffice.app\n' "@abs_builddir@"; \
else \
printf 'cd %s/install/program\n. ./ooenv\n./soffice.bin\n' \
"@abs_builddir@"; \
fi
+debugrun : dev-install
+ @. ./Env.Host.sh && $$GNUMAKE -f "$$SRC_ROOT"/GNUmakefile.mk debugrun
+
check : allcheck
@true
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 33d068c..ab0d67f 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -58,9 +58,15 @@ $(call gb_JunitTest_get_target,%) :
-e 'at java.lang.reflect.' \
-e 'at sun.reflect.' $@.log \
&& echo "see full error log at $@.log" \
- && echo "to rerun just this failed test without all others, run either:" \
- && echo "cd \$$MODULE && make $@" \
- && echo "make -f $(SRCDIR)/GNUmakefile.mk $@" && false)) && \
+ && echo "to rerun just this failed test without all others, run:" \
+ && echo && echo " make $@" && echo \
+ && echo "add \"-f $(SRCDIR)/GNUmakefile.mk\" if you are not in the module dir" \
+ && echo "Or to do interactive debugging, run two shells with (Linux only):" \
+ && echo \
+ && echo " make debugrun" \
+ && echo " make gb_JunitTest_DEBUGRUN=T $@" \
+ && echo \
+ && false)) && \
rm -rf $(call gb_JunitTest_get_userdir,$*))
$(CLEAN_CMD)
commit a65b46b71d0f95119b343f4e931a318703889b08
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Nov 25 14:38:18 2011 +0100
remove debugcommand -- debugrun is superceding it
diff --git a/unotest/source/java/org/openoffice/test/OfficeConnection.java b/unotest/source/java/org/openoffice/test/OfficeConnection.java
index 8f99076..ae2cae0 100644
--- a/unotest/source/java/org/openoffice/test/OfficeConnection.java
+++ b/unotest/source/java/org/openoffice/test/OfficeConnection.java
@@ -105,12 +105,6 @@ public final class OfficeConnection {
assertNull(waitForProcess(process, 1000)); // 1 sec
}
}
- try {
- ProcessBuilder debugbp = new ProcessBuilder(
- Argument.get("debugcommand").split(" "));
- debugbp.start();
- Thread.sleep(1000);
- } catch(Exception e) {}
}
/** Shut down the OOo instance.
commit b684a5bb0374719976accaa9cedca44fa3d821ad
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Nov 25 14:36:18 2011 +0100
create debugrun target, adjust JunitTests to them
diff --git a/solenv/gbuild/JunitTest.mk b/solenv/gbuild/JunitTest.mk
index 3003c9d..33d068c 100644
--- a/solenv/gbuild/JunitTest.mk
+++ b/solenv/gbuild/JunitTest.mk
@@ -50,8 +50,6 @@ $(call gb_JunitTest_get_target,%) :
mkdir -p $(call gb_JunitTest_get_userdir,$*) && \
($(gb_JunitTest_JAVACOMMAND) \
-cp "$(CLASSPATH)" \
- $(if $(strip $(gb_JunitTest_DEBUGCOMMAND)),\
- '-Dorg.openoffice.test.arg.debugcommand=$(gb_JunitTest_DEBUGCOMMAND)') \
$(DEFS) \
org.junit.runner.JUnitCore \
$(CLASSES) 2>&1 > $@.log || \
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 82da041..582d960 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -112,6 +112,10 @@ check : unitcheck
$(call gb_Output_announce_title,all tests checked.)
$(call gb_Output_announce_bell)
+debugrun : build
+ $(call gb_Module_DEBUGRUNCOMMAND)
+
+
ifeq ($(strip $(gb_PARTIALBUILD)),)
check : subsequentcheck
@@ -149,6 +153,10 @@ endif
endef
+# Dont recurse in subdirs for help an debugrun
+
+ifeq ($(filter help debugrun,$(MAKECMDGOALS)),)
+
define gb_Module_add_target
$(call gb_Module__read_targetfile,$(1),$(2),target)
@@ -187,6 +195,8 @@ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
endef
+endif
+
define gb_Module_add_moduledir
include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk
$(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 361632e..0d0bad3 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -123,7 +123,7 @@ gb_ENABLE_PCH := $(false)
endif
# for clean, setuplocal and removelocal goals we switch off dependencies
-ifneq ($(filter cleanpackmodule clean setuplocal removelocal showdeliverables help,$(MAKECMDGOALS)),)
+ifneq ($(filter cleanpackmodule clean setuplocal removelocal showdeliverables help debugrun,$(MAKECMDGOALS)),)
gb_FULLDEPS := $(false)
else
gb_FULLDEPS := $(true)
@@ -377,6 +377,8 @@ AVAILABLE TARGETS
check run unit tests and if in toplevel subsequentcheck
clean remove all generated files
showdeliverables show the targets delivered to OUTDIR and their source
+ debugrun starts the dev-install instance and allows tests to be run
+ against it
INTERACTIVE VARIABLES:
DEBUG / debug If not empty, build with DBGLEVEL=1 (see below).
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 8c8380c..d34d4a1 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -377,16 +377,40 @@ endef
# JunitTest class
+ifneq ($(OOO_TEST_SOFFICE),)
+gb_JunitTest_SOFFICEARG:=$(OOO_TEST_SOFFICE)
+else
+ifneq ($(gb_JunitTest_DEBUGRUN),)
+gb_JunitTest_SOFFICEARG:=connect:pipe,name=$(USER)
+else
+gb_JunitTest_SOFFICEARG:=$(OUTDIR)/installation/opt/program/soffice"
+endif
+endif
+
define gb_JunitTest_JunitTest_platform
$(call gb_JunitTest_get_target,$(1)) : DEFS := \
- -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/program/soffice}" \
-Dorg.openoffice.test.arg.env=$(gb_Helper_LIBRARY_PATH_VAR) \
-Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
-Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
-Dorg.openoffice.test.arg.postprocesscommand=$(GBUILDDIR)/platform/unxgcc_gdbforjunit.sh \
+ -Dorg.openoffice.test.arg.soffice="$(gb_JunitTest_SOFFICEARG)" \
+
+endef
+# Module class
+
+define gb_Module_DEBUGRUNCOMMAND
+OFFICESCRIPT=`mktemp` && \
+echo ". $(OUTDIR)/installation/opt/program/ooenv" > $${OFFICESCRIPT} && \
+echo "$(OUTDIR)/installation/opt/program/soffice.bin --norestore --nologo \"--accept=pipe,name=$(USER);urp;\" -env:UserInstallation=file://$(OUTDIR)/installation/ &" >> $${OFFICESCRIPT} && \
+echo "OFFICEPID=\$$!" >> $${OFFICESCRIPT} && \
+echo "echo \"office started as \$${OFFICEPID}\"" >> $${OFFICESCRIPT} && \
+echo "gdb -ex \"at \$${OFFICEPID}\" -ex \"c\"" >> $${OFFICESCRIPT} && \
+$(SHELL) $${OFFICESCRIPT} && \
+rm $${OFFICESCRIPT}
endef
+
# Python
gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME=$(OUTDIR)/lib/python PYTHONPATH=$(OUTDIR)/lib/python:$(OUTDIR)/lib/python/lib-dynload
More information about the Libreoffice-commits
mailing list