[llvm] [llvm-lit] Print environment variables when using env without subcommand (PR #98414)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 10:42:24 PDT 2024


Harini0924 wrote:

@jh7370 @RoboTux Thank you for the feedback earlier. To clarify, I'm implementing the tests by splitting them into two separate test files—one for positive tests and one for negative tests.

- **Positive Tests:**  In the positive test file, I’m removing `not` from the RUN line (e.g., `# RUN: %{lit} -a -v %{inputs}/shtest-env-positive | FileCheck -match-full-lines %s`) and using `# CHECK-NOT: # error: `to ensure no errors occur.

- **Negative Tests:**  In the negative test file, I will keep `not` in the RUN line (e.g., `# RUN: not %{lit} -a -v %{inputs}/shtest-env-negative | FileCheck -match-full-lines %s`) and will use `# CHECK: # error: command failed with exit status: {{.*}}`, since these tests are expected to fail and will have an error line.

Does this approach align with what you were suggesting? I want to make sure I'm on the right track.

https://github.com/llvm/llvm-project/pull/98414


More information about the llvm-commits mailing list