<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <b class="gmail_sendername" dir="auto">Anshil Gandhi</b> <span dir="auto"><<a href="mailto:gandhi21299@gmail.com">gandhi21299@gmail.com</a>></span><br>Date: Tue, Sep 21, 2021 at 11:38 PM<br>Subject: Re: [llvm-dev] Adding an execution result keyword in LIT<br>To: Michael Kruse <<a href="mailto:llvmdev@meinersbur.de">llvmdev@meinersbur.de</a>><br></div><br><br><div dir="ltr"><div>Hey Michael,</div><div><br></div><div>Thanks for your response! executeShCmd() is never being called when I run `./bin/llvm-lit -v <test-file>`.</div><div><br></div><div>I am thinking of somehow interacting with the <span style="font-family:verdana,sans-serif">subprocess.Popen(...)</span> in <span style="font-family:verdana,sans-serif">lit/util.py::executeCommand(...)</span> since this is where the script is executed. I need to obtain the execution result status somehow, this is the tricky part.</div><div><br></div><div>Best,</div><div><br></div><div>Anshil<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 20, 2021 at 6:06 PM Michael Kruse <<a href="mailto:llvmdev@meinersbur.de" target="_blank">llvmdev@meinersbur.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The "RUN: at line 1" part is printed by prepending an null command (a<br>
colon) to the command line, which personally found to be a rather<br>
strange implementation. Since PASSED/FAILED depends on the result, it<br>
could at most be done by appending a command. Maybe both should be<br>
printed in python itself, somewhere in TestRunner.py executeShCmd.<br>
This executes all RUN-lines at once, with a single time-out. Something<br>
that executes after each RUN line would need to be added. However,<br>
printing the RUN-line before executing the command has the theoretical<br>
advantage that one can could see where the current execution is stuck,<br>
which may not matter that much since typically output is printed only<br>
after it is known that the command failed.<br>
<br>
Michael<br>
<br>
Am Mo., 20. Sept. 2021 um 16:51 Uhr schrieb Anshil Gandhi via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>:<br>
><br>
> Hey all,<br>
><br>
> I am working on adding an execution result keyword such as `PASSED`, `FAILED`, `XFAILED`, etc. to LIT to indicate the result for each RUN execution. For example,<br>
><br>
> : 'RUN: at line 1' (PASSED); /home/anshil/amd-workspace/llvm-project/build/bin/llc -march=amdgcn -mcpu=tahiti -verify-machineinstrs < /home/anshil/amd-workspace/llvm-project/llvm/test/CodeGen/AMDGPU/inline-calls.ll | /home/anshil/amd-workspace/llvm-project/build/bin/FileCheck /home/anshil/amd-workspace/llvm-project/llvm/test/CodeGen/AMDGPU/inline-calls.ll<br>
><br>
> I was wondering what would be the most appropriate place to implement this? I was thinking somewhere under `parseIntegratedTestScriptsCommands(source_path, keywords)` in TestRunner.py but I am open to suggestions.<br>
><br>
> Best,<br>
><br>
> Anshil Gandhi<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</div></div>