<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:fang@csl.cornell.edu" title="David Fang <fang@csl.cornell.edu>"> <span class="fn">David Fang</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Other/pipefail.txt fails when using a timeout command prefix"
   href="http://llvm.org/bugs/show_bug.cgi?id=16743">bug 16743</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WORKSFORME
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Other/pipefail.txt fails when using a timeout command prefix"
   href="http://llvm.org/bugs/show_bug.cgi?id=16743#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Other/pipefail.txt fails when using a timeout command prefix"
   href="http://llvm.org/bugs/show_bug.cgi?id=16743">bug 16743</a>
              from <span class="vcard"><a class="email" href="mailto:fang@csl.cornell.edu" title="David Fang <fang@csl.cornell.edu>"> <span class="fn">David Fang</span></a>
</span></b>
        <pre>The revised local patch works for me:
(Don't timeout when command starts with a grouping operator.)

diff --git a/utils/lit/lit/LitConfig.py b/utils/lit/lit/LitConfig.py
index 9bcf20b..f2003eb 100644
--- a/utils/lit/lit/LitConfig.py
+++ b/utils/lit/lit/LitConfig.py
@@ -34,7 +34,8 @@ class LitConfig:
         self.debug = debug
         self.isWindows = bool(isWindows)
         self.params = dict(params)
-        self.bashPath = None
+       # local hack only, don't commit this patch
+        self.bashPath = '/sw/bin/bash'

         # Configuration files to look for when discovering test suites.
         self.config_prefix = config_prefix or 'lit'
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
index daa9b7d..e988f2e 100644
--- a/utils/lit/lit/TestRunner.py
+++ b/utils/lit/lit/TestRunner.py
@@ -388,8 +388,11 @@ def parseIntegratedTestScript(test,
normalize_slashes=False
,
             # Collapse lines with trailing '\\'.
             if script and script[-1][-1] == '\\':
                 script[-1] = script[-1][:-1] + ln
-            else:
+            elif ln[1] == '(' or ln[1] == '{':
                 script.append(ln)
+            else:
+                script.append('gtimeout 5m ' +ln)
+               # do not commit this patch
         elif 'XFAIL:' in ln:
             items = ln[ln.index('XFAIL:') + 6:].split(',')
             xfails.extend([s.strip() for s in items])</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>