[PATCH] D39567: [lit] Implement non-pipelined ‘mkdir’, ‘diff’ and ‘rm’ commands internally
    Reid Kleckner via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Nov  6 14:50:34 PST 2017
    
    
  
rnk added inline comments.
================
Comment at: lit/lit/TestRunner.py:566-569
+    if cmd.commands[0].args[0] == 'mkdir':
+        if len(cmd.commands) != 1:
+            raise InternalShellError(cmd.commands[0], "Unsupported: 'mkdir' "
+                                     "cannot be part of a pipeline")
----------------
Can you refactor the handling of non-pipelined commands, either in this change, or split before or after? I'm imagining a dict of commands and methods that implement builtin shell commands, which would then be ripe for refactoring into a separate shell module or something.
================
Comment at: lit/lit/TestRunner.py:573-576
+    if cmd.commands[0].args[0] == 'diff':
+        if len(cmd.commands) != 1:
+            raise InternalShellError(cmd.commands[0], "Unsupported: 'diff' "
+                                     "cannot be part of a pipeline")
----------------
I'd be surprised if this isn't used somewhere.
https://reviews.llvm.org/D39567
    
    
More information about the llvm-commits
mailing list