diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-19 15:03:37 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-20 08:07:29 +0100 |
commit | 0020fc1167b3760d0631001689a44427b72b816e (patch) | |
tree | 2f9782a7fb7b2e143465a9d7a0d8871642b9db3d /solenv | |
parent | c07548447a564b2d142cc439a124b76e6a71dfbd (diff) |
Fix PythonTest_solenv_python for Linux --enable-mergelibs=more
...where it recently started to fail for me with
> ======================================================================
> ERROR: test_gbuildtojson (gbuildtojson.CheckGbuildToJsonModules)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "solenv/qa/python/gbuildtojson.py", line 147, in test_gbuildtojson
> jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Library'))
> FileNotFoundError: [Errno 2] No such file or directory: '/tmp/gbuildffqxqxbf/GbuildToJson/Library'
presumably because none of the modules iterated over there happen to put any
files into the GbuildToJson/Library directory (and, by doing so, would create
that directory)
Change-Id: I2622f300d6d9c45d28a98fb6bb82aa684d1d5507
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165033
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/qa/python/gbuildtojson.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/solenv/qa/python/gbuildtojson.py b/solenv/qa/python/gbuildtojson.py index a6ba733d06b6..d8434acc5216 100644 --- a/solenv/qa/python/gbuildtojson.py +++ b/solenv/qa/python/gbuildtojson.py @@ -144,7 +144,10 @@ class CheckGbuildToJsonModules(unittest.TestCase): bashscript.close() subprocess.check_call([self.bash, bashscriptname.replace('\\', '/')]) os.remove(bashscriptname) - jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Library')) + try: + jsonfiles = os.listdir(os.path.join(self.tempwork, 'GbuildToJson', 'Library')) + except FileNotFoundError: + jsonfiles = [] gbuildlibs = [] for jsonfilename in jsonfiles: with open(os.path.join(self.tempwork, 'GbuildToJson', 'Library', jsonfilename), 'r') as f: |