From: Todd Fiala Date: Mon, 4 Apr 2016 19:40:29 +0000 (+0000) Subject: Xcode: run gtests when building the lldb-gtest target X-Git-Tag: llvmorg-3.9.0-rc1~10064 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ce44feaadb3e295e4e0c2f5c29e23f73995639c;p=platform%2Fupstream%2Fllvm.git Xcode: run gtests when building the lldb-gtest target This addresses the following task: https://llvm.org/bugs/show_bug.cgi?id=27181 Xcode gtests: ensure they run, not just build, on Xcode target llvm-svn: 265340 --- diff --git a/lldb/lldb.xcodeproj/project.pbxproj b/lldb/lldb.xcodeproj/project.pbxproj index 6acee3b..4ac9788 100644 --- a/lldb/lldb.xcodeproj/project.pbxproj +++ b/lldb/lldb.xcodeproj/project.pbxproj @@ -6007,6 +6007,7 @@ 239504D01BDD451400963CEA /* Sources */, 239504D11BDD451400963CEA /* Frameworks */, 239504D21BDD451400963CEA /* CopyFiles */, + 23B9815E1CB2E2F90059938A /* Run gtests */, ); buildRules = ( ); @@ -6239,6 +6240,20 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 23B9815E1CB2E2F90059938A /* Run gtests */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run gtests"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Run the just-built gtest executable\n\n# Uncomment this to see the steps in action\n# set -x\n\n# We need to hide the lldb.py that goes into BUILT_PRODUCTS\n# because it will conflict with finding the lldb module later,\n# which causes the python exception tests to fail.\nif [ -f \"${BUILT_PRODUCTS_DIR}/lldb.py\" ]; then\n mv -f \"${BUILT_PRODUCTS_DIR}/lldb.py\" \"${BUILT_PRODUCTS_DIR}/park.lldb.py\"\nfi\n\n# Tell lldb-gtest where to find the lldb package\nexport PYTHONPATH=${BUILT_PRODUCTS_DIR}/LLDB.framework/Resources/Python\n\n# We must redirect stdin to /dev/null: without this, xcodebuild\n# will wait forever for input when we run the TestExceptionStateChecking\n# test.\n${BUILT_PRODUCTS_DIR}/lldb-gtest < /dev/null\nRETCODE=$?\n\nif [ -f \"${BUILT_PRODUCTS_DIR}/park.lldb.py\" ]; then\nmv -f \"${BUILT_PRODUCTS_DIR}/park.lldb.py\" \"${BUILT_PRODUCTS_DIR}/lldb.py\"\nfi\n\nexit ${RETCODE}"; + }; 261B5A7511C3FA6F00AABD0A /* Fixup Framework Headers */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647;