[Libreoffice-commits] core.git: 3 commits - Repository.mk solenv/gbuild solenv/qa
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Thu Oct 13 23:11:46 UTC 2016
Repository.mk | 3 -
solenv/gbuild/extensions/post_GbuildToIde.mk | 4 -
solenv/qa/python/gbuildtoide.py | 37 ++++++++------
solenv/qa/python/selftest/Executable_gbuildselftestexe.mk | 16 ++++++
solenv/qa/python/selftest/Module_selftest.mk | 1
solenv/qa/python/selftest/selftestexeobject.cxx | 1
6 files changed, 44 insertions(+), 18 deletions(-)
New commits:
commit 45a7137c6796f33fbf5b8f7cb64e293260d991cb
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Oct 14 01:04:51 2016 +0200
tearDown/clean up solenv test tempdir
Change-Id: I2fc5497b0aeadbc43e967f338a3b8718995f2a5c
diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
index a1b8d1c..11e66a8 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtoide.py
@@ -16,15 +16,19 @@ import tempfile
class CheckGbuildToIde(unittest.TestCase):
+ def setUp(self):
+ self.tempwork = tempfile.mkdtemp()
+
+ def tearDown(self):
+ subprocess.check_call(['rm', '-rf', self.tempwork])
def test_gbuildtoide(self):
- tempwork = tempfile.mkdtemp()
os.chdir(os.path.join(os.environ['SRCDIR'], 'solenv', 'qa', 'python', 'selftest'))
- subprocess.check_call(['make', 'gbuildtoide', 'WORKDIR=%s' % tempwork])
- jsonfiles = os.listdir(os.path.join(tempwork, 'GbuildToIde', 'Library'))
+ subprocess.check_call(['make', 'gbuildtoide', 'WORKDIR=%s' % self.tempwork])
+ jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 'Library'))
gbuildlibs = []
for jsonfilename in jsonfiles:
- with open(os.path.join(tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f:
+ with open(os.path.join(self.tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f:
gbuildlibs.append(json.load(f))
foundlibs = set()
for lib in gbuildlibs:
@@ -43,10 +47,10 @@ class CheckGbuildToIde(unittest.TestCase):
self.assertTrue(False)
self.assertEqual(foundlibs, set(['gbuildselftest', 'gbuildselftestdep']))
self.assertEqual(len(foundlibs), 2)
- jsonfiles = os.listdir(os.path.join(tempwork, 'GbuildToIde', 'Executable'))
+ jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 'Executable'))
gbuildexes = []
for jsonfilename in jsonfiles:
- with open(os.path.join(tempwork, 'GbuildToIde', 'Executable', jsonfilename), 'r') as f:
+ with open(os.path.join(self.tempwork, 'GbuildToIde', 'Executable', jsonfilename), 'r') as f:
gbuildexes.append(json.load(f))
foundexes = set()
for exe in gbuildexes:
commit bc6c26d3c1269c91f7d963fe96c01740732b094b
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Oct 14 00:59:53 2016 +0200
fix license, this is entirely new content
Change-Id: Icf1818fb894d039eeb4e7f1306a53ac4322fa075
diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
index 78917b8..a1b8d1c 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtoide.py
@@ -1,19 +1,10 @@
'''
- This is file is part of the LibreOffice project.
+ This file is part of the LibreOffice project.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
- This file incorporates work covered by the following license notice:
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed
- with this work for additional information regarding copyright
- ownership. The ASF licenses this file to you under the Apache
- License, Version 2.0 (the "License"); you may not use this file
- except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 .
'''
import subprocess
commit 5cfcd6809f46e9ca3665c6f7430658e4d71af855
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Fri Oct 14 00:57:36 2016 +0200
add gbuildtoide support for exes
Change-Id: I320ee341651dd0c92de5176c10aa5290afea1d38
diff --git a/Repository.mk b/Repository.mk
index 169769e..47a1ad0 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1001,7 +1001,8 @@ $(eval $(call gb_Helper_register_uiconfigs,\
))
ifeq ($(gb_GBUILDSELFTEST),t)
-$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,gbuildselftestdep gbuildselftest))
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, gbuildselftestdep gbuildselftest))
+$(eval $(call gb_Helper_register_executables,NONE, gbuildselftestexe))
endif
# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/extensions/post_GbuildToIde.mk b/solenv/gbuild/extensions/post_GbuildToIde.mk
index d574d03..c8087ba 100644
--- a/solenv/gbuild/extensions/post_GbuildToIde.mk
+++ b/solenv/gbuild/extensions/post_GbuildToIde.mk
@@ -41,9 +41,9 @@ printf '}\n' >> $(WORKDIR)/GbuildToIde/$(2)
endef
define gb_Postprocess_register_target
-gbuildtoide : $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(3)))
+gbuildtoide : $(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3)))
-$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(3))): $(gb_Helper_MISCDUMMY) foo
+$(call gb_LinkTarget_get_target,$(call gb_$(2)_get_linktarget,$(3))): $(gb_Helper_MISCDUMMY) foo
endef
endif
diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtoide.py
index 71c6775..78917b8 100644
--- a/solenv/qa/python/gbuildtoide.py
+++ b/solenv/qa/python/gbuildtoide.py
@@ -34,7 +34,6 @@ class CheckGbuildToIde(unittest.TestCase):
gbuildlibs = []
for jsonfilename in jsonfiles:
with open(os.path.join(tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f:
- print('loading %s' % jsonfilename)
gbuildlibs.append(json.load(f))
foundlibs = set()
for lib in gbuildlibs:
@@ -53,6 +52,19 @@ class CheckGbuildToIde(unittest.TestCase):
self.assertTrue(False)
self.assertEqual(foundlibs, set(['gbuildselftest', 'gbuildselftestdep']))
self.assertEqual(len(foundlibs), 2)
+ jsonfiles = os.listdir(os.path.join(tempwork, 'GbuildToIde', 'Executable'))
+ gbuildexes = []
+ for jsonfilename in jsonfiles:
+ with open(os.path.join(tempwork, 'GbuildToIde', 'Executable', jsonfilename), 'r') as f:
+ gbuildexes.append(json.load(f))
+ foundexes = set()
+ for exe in gbuildexes:
+ if exe['LINKTARGET'].find('gbuildselftestexe') != -1:
+ foundexes.add('gbuildselftestexe')
+ else:
+ self.assertTrue(False)
+ self.assertEqual(foundexes, set(['gbuildselftestexe']))
+ self.assertEqual(len(foundexes), 1)
if __name__ == "__main__":
unittest.main()
diff --git a/solenv/qa/python/selftest/Executable_gbuildselftestexe.mk b/solenv/qa/python/selftest/Executable_gbuildselftestexe.mk
new file mode 100644
index 0000000..c43a771
--- /dev/null
+++ b/solenv/qa/python/selftest/Executable_gbuildselftestexe.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Executable_Executable,gbuildselftestexe))
+
+$(eval $(call gb_Executable_add_exception_objects,gbuildselftestexe,\
+ solenv/qa/python/selftest/selftestexeobject \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/qa/python/selftest/Module_selftest.mk b/solenv/qa/python/selftest/Module_selftest.mk
index 9e297dd..f4fb030 100644
--- a/solenv/qa/python/selftest/Module_selftest.mk
+++ b/solenv/qa/python/selftest/Module_selftest.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Module_Module,gbuildtoidetest))
$(eval $(call gb_Module_add_targets,gbuildtoidetest,\
Library_gbuildselftestdep \
Library_gbuildselftest \
+ Executable_gbuildselftestexe \
))
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/solenv/qa/python/selftest/selftestexeobject.cxx b/solenv/qa/python/selftest/selftestexeobject.cxx
new file mode 100644
index 0000000..78f2de1
--- /dev/null
+++ b/solenv/qa/python/selftest/selftestexeobject.cxx
@@ -0,0 +1 @@
+int main(void) { return 0; }
More information about the Libreoffice-commits
mailing list