diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-11-23 01:29:32 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-11-25 02:05:02 +0000 |
commit | 1fcd5c48a0ae25822645b83dff42ad3c246e5b28 (patch) | |
tree | 17375e6bc5e85b81306856b0136a17f5831c06f5 /solenv/qa | |
parent | c5b8bd03333803c57e69fd34642d83816c4cdbcb (diff) |
rename the core parts of this from gbuildtoide to gbuildtojson
- the json stuff is universal and not limited in use to IDEs
- the IDE stuff should keep its gbuildtoide name
Change-Id: If4f190fc6dffba219334d57a53c826515ed57c34
Reviewed-on: https://gerrit.libreoffice.org/31093
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'solenv/qa')
-rw-r--r-- | solenv/qa/python/gbuildtojson.py (renamed from solenv/qa/python/gbuildtoide.py) | 27 | ||||
-rw-r--r-- | solenv/qa/python/selftest/Library_gbuildselftest.mk | 2 | ||||
-rw-r--r-- | solenv/qa/python/selftest/Module_selftest.mk | 4 |
3 files changed, 17 insertions, 16 deletions
diff --git a/solenv/qa/python/gbuildtoide.py b/solenv/qa/python/gbuildtojson.py index 501c5c5b23b4..67782d53ad3f 100644 --- a/solenv/qa/python/gbuildtoide.py +++ b/solenv/qa/python/gbuildtojson.py @@ -35,7 +35,7 @@ def clearmakevars(): del os.environ[makeenvvar] -class CheckGbuildToIde(unittest.TestCase): +class CheckGbuildToJson(unittest.TestCase): def setUp(self): getgbuildtesttools(self) clearmakevars() @@ -44,21 +44,21 @@ class CheckGbuildToIde(unittest.TestCase): def tearDown(self): shutil.rmtree(self.tempwork) - def test_gbuildtoide(self): + def test_gbuildtojson(self): os.makedirs(os.path.join(self.tempwork, 'LinkTarget', 'Executable')) shutil.copy(self.gbuildtojson, os.path.join(self.tempwork, 'LinkTarget', 'Executable')) (bashscripthandle, bashscriptname) = tempfile.mkstemp() bashscript = os.fdopen(bashscripthandle, 'w', newline='\n') bashscript.write("set -e\n") bashscript.write("cd %s/solenv/qa/python/selftest\n" % os.environ['SRCDIR']) - bashscript.write("%s gbuildtoide WORKDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/'))) + bashscript.write("%s gbuildtojson WORKDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/'))) bashscript.close() subprocess.check_call([self.bash, bashscriptname.replace('\\', '/')]) os.remove(bashscriptname) - jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 'Library')) + jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Library')) gbuildlibs = [] for jsonfilename in jsonfiles: - with open(os.path.join(self.tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f: + with open(os.path.join(self.tempwork, 'GbuildToJson', 'Library', jsonfilename), 'r') as f: gbuildlibs.append(json.load(f)) foundlibs = set() for lib in gbuildlibs: @@ -67,7 +67,7 @@ class CheckGbuildToIde(unittest.TestCase): foundlibs.add('gbuildselftestdep') elif lib['LINKTARGET'].find('gbuildselftest') != -1: foundlibs.add('gbuildselftest') - self.assertIn('-Igbuildtoidetestinclude', lib['INCLUDE'].split()) + self.assertIn('-Igbuildtojsontestinclude', lib['INCLUDE'].split()) self.assertIn('gbuildselftestdep', lib['LINKED_LIBS'].split()) self.assertIn('solenv/qa/python/selftest/selftestobject', lib['CXXOBJECTS'].split()) self.assertIn('-DGBUILDSELFTESTDEF', lib['DEFS'].split()) @@ -77,10 +77,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(self.tempwork, 'GbuildToIde', 'Executable')) + jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Executable')) gbuildexes = [] for jsonfilename in jsonfiles: - with open(os.path.join(self.tempwork, 'GbuildToIde', 'Executable', jsonfilename), 'r') as f: + with open(os.path.join(self.tempwork, 'GbuildToJson', 'Executable', jsonfilename), 'r') as f: gbuildexes.append(json.load(f)) foundexes = set() for exe in gbuildexes: @@ -91,7 +91,7 @@ class CheckGbuildToIde(unittest.TestCase): self.assertEqual(foundexes, set(['gbuildselftestexe'])) self.assertEqual(len(foundexes), 1) -class CheckGbuildToIdeModules(unittest.TestCase): +class CheckGbuildToJsonModules(unittest.TestCase): def setUp(self): getgbuildtesttools(self) clearmakevars() @@ -119,7 +119,7 @@ class CheckGbuildToIdeModules(unittest.TestCase): shutil.rmtree(self.tempsrc) shutil.rmtree(self.tempwork) - def test_gbuildtoide(self): + def test_gbuildtojson(self): modules = ['accessibility', 'android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'drawinglayer', 'dtrans', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'idlc', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'mysqlc', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'onlineupdate', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'rsc', 'salhelper', 'sax', 'sc', 'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtools', 'toolkit', 'tubes', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmerge', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity'] if os.environ['OS'] == 'WNT': # for now, use a limited subset for testing on windows as it is so annoyingly slow on this @@ -134,16 +134,17 @@ class CheckGbuildToIdeModules(unittest.TestCase): bashscript = os.fdopen(bashscripthandle, 'w', newline='\n') bashscript.write("set -e\n") bashscript.write("cd %s/%s\n" % (self.tempsrc.replace('\\','/'), module)) - bashscript.write("%s gbuildtoide WORKDIR=%s SRCDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/'), self.tempsrc.replace('\\','/'))) + bashscript.write("%s gbuildtojson WORKDIR=%s SRCDIR=%s\n" % (self.make, self.tempwork.replace('\\', '/'), self.tempsrc.replace('\\','/'))) bashscript.close() subprocess.check_call([self.bash, bashscriptname.replace('\\', '/')]) os.remove(bashscriptname) - jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToIde', 'Library')) + jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Library')) gbuildlibs = [] for jsonfilename in jsonfiles: - with open(os.path.join(self.tempwork, 'GbuildToIde', 'Library', jsonfilename), 'r') as f: + with open(os.path.join(self.tempwork, 'GbuildToJson', 'Library', jsonfilename), 'r') as f: gbuildlibs.append(json.load(f)) + if __name__ == "__main__": unittest.main() diff --git a/solenv/qa/python/selftest/Library_gbuildselftest.mk b/solenv/qa/python/selftest/Library_gbuildselftest.mk index d1b39195adb4..bed015c092be 100644 --- a/solenv/qa/python/selftest/Library_gbuildselftest.mk +++ b/solenv/qa/python/selftest/Library_gbuildselftest.mk @@ -10,7 +10,7 @@ $(eval $(call gb_Library_Library,gbuildselftest)) $(eval $(call gb_Library_set_include,gbuildselftest,\ - -Igbuildtoidetestinclude\ + -Igbuildtojsontestinclude\ $$(INCLUDE) \ )) diff --git a/solenv/qa/python/selftest/Module_selftest.mk b/solenv/qa/python/selftest/Module_selftest.mk index f4fb0304f21b..37c53fdbf956 100644 --- a/solenv/qa/python/selftest/Module_selftest.mk +++ b/solenv/qa/python/selftest/Module_selftest.mk @@ -7,9 +7,9 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -$(eval $(call gb_Module_Module,gbuildtoidetest)) +$(eval $(call gb_Module_Module,gbuildtojsontest)) -$(eval $(call gb_Module_add_targets,gbuildtoidetest,\ +$(eval $(call gb_Module_add_targets,gbuildtojsontest,\ Library_gbuildselftestdep \ Library_gbuildselftest \ Executable_gbuildselftestexe \ |