[Lldb-commits] [PATCH] D109004: [lldb] Catch all exceptions when checking if simulator exists
    Raphael Isemann via Phabricator via lldb-commits 
    lldb-commits at lists.llvm.org
       
    Tue Aug 31 12:54:10 PDT 2021
    
    
  
teemperor added a comment.
Weird, in the test log it seems xcodebuild fails, but that would just raise a `CalledProcessError` (which we already catch here and cause the test to skip). And this would also not print anything to stderr as we set the stderr output in the `check_output` call to `/dev/null`? But instead of aborting or skipping the test, we're actually running the test and then failing to parse the simctl output in the test it self (and that's why the test fails):
  ERROR: test_simulator_ostype_ios_debugserver (TestAppleSimulatorOSType.TestAppleSimulatorOSType)
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/Users/buildnode/jenkins/workspace/oss-lldb-5.5-incremental-macos-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py", line 52, in test_method
      return attrvalue(self)
    File "/Users/buildnode/jenkins/workspace/oss-lldb-5.5-incremental-macos-cmake/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 136, in wrapper
      return func(*args, **kwargs)
    File "/Users/buildnode/jenkins/workspace/oss-lldb-5.5-incremental-macos-cmake/llvm-project/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py", line 120, in test_simulator_ostype_ios
      self.check_simulator_ostype(sdk='iphonesimulator',
    File "/Users/buildnode/jenkins/workspace/oss-lldb-5.5-incremental-macos-cmake/llvm-project/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py", line 22, in check_simulator_ostype
      sim_devices = json.loads(sim_devices_str)['devices']
    File "/Applications/Xcode-beta.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/__init__.py", line 357, in loads
      return _default_decoder.decode(s)
    File "/Applications/Xcode-beta.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/Applications/Xcode-beta.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
      raise JSONDecodeError("Expecting value", s, err.value) from None
  json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  Config=x86_64-/Users/buildnode/jenkins/workspace/oss-lldb-5.5-incremental-macos-cmake/Ninja-ReleaseAssert+stdlib-Release/llvm-macosx-x86_64/bin/clang
Not sure if I'm looking at a different implementation than we're running on jenkins, but I don't see how we can end up with this xcodebuild error that would end up in stderr and that would still allow the test to run. Any idea?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109004/new/
https://reviews.llvm.org/D109004
    
    
More information about the lldb-commits
mailing list