RFC: Improving lit's debug output

Hi,

I’m a little puzzled here.

To me it seems like if you use “lit’s internal shell” the changes here are pretty nice in that the output you see looks better.

However, we must be a lot of users that don’t use that? I wasn’t even aware such a thing existed before reading this RFC.

And if you don’t use lit’s internal shell, to be blunt, these changes kind of just makes the normal daily workflow worse?

Before if I had a lit test fail, I would see e.g. a printout like

: 'RUN: at line 2';   /repo/uabelho/dev-main/llvm/build-all/bin/opt -S -passes=argpromotion < /repo/uabelho/dev-main/llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll | /repo/uabelho/dev-main/llvm/build-all/bin/FileCheck /repo/uabelho/dev-main/llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll

which I in many/most cases could just copy/paste to reproduce the failure.

Now instead I get

+ : 'RUN: at line 2'
+ /repo/uabelho/dev-main/llvm/build-all/bin/opt -S -passes=argpromotion
+ /repo/uabelho/dev-main/llvm/build-all/bin/FileCheck /repo/uabelho/dev-main/llvm/test/Transforms/ArgumentPromotion/opaque-ptr.ll

So when I run “ninja check-all” now and a lit test somewhere fails, the debugging experience for me is worse since I can no longer directly see a command line that I can copy/paste to reproduce the failure.

Now I either have to copy/paste a couple of different things from the printouts, or I have to rerun the specific testcase with

 LIT_USE_INTERNAL_SHELL=1 llvm-lit [...]

and if that works, then I can copy/paste the command I wanted.

Sure it works but as I started this post, I’m a little puzzled not more people find this extra step in a normal workflow slightly annoying.

If lit’s internal shell was the default this would probably all just be good but unfortunately it isn’t.

2 Likes