Xcode: run gtests when building the lldb-gtest target
authorTodd Fiala <todd.fiala@gmail.com>
Mon, 4 Apr 2016 19:40:29 +0000 (19:40 +0000)
committerTodd Fiala <todd.fiala@gmail.com>
Mon, 4 Apr 2016 19:40:29 +0000 (19:40 +0000)
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

lldb/lldb.xcodeproj/project.pbxproj

index 6acee3b..4ac9788 100644 (file)
                                239504D01BDD451400963CEA /* Sources */,
                                239504D11BDD451400963CEA /* Frameworks */,
                                239504D21BDD451400963CEA /* CopyFiles */,
+                               23B9815E1CB2E2F90059938A /* Run gtests */,
                        );
                        buildRules = (
                        );
 /* 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;