Skip to content

Conversation

boomanaiden154
Copy link
Contributor

This patch removes %T from tests in preparation for removing the
substitution completely. Splitting this off from the actual removal to
make it easier to revert the removal of %T in case I missed something.

@llvmbot
Copy link
Member

llvmbot commented Sep 22, 2025

@llvm/pr-subscribers-testing-tools

Author: Aiden Grossman (boomanaiden154)

Changes

This patch removes %T from tests in preparation for removing the
substitution completely. Splitting this off from the actual removal to
make it easier to revert the removal of %T in case I missed something.


Full diff: https://github.com/llvm/llvm-project/pull/160027.diff

1 Files Affected:

  • (modified) llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt (+28-28)
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt
index 75ce8b7733ad7..cfa829f0bf2f7 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/valid-shell.txt
@@ -18,15 +18,15 @@
 # Check force remove commands success whether the directory does or doesn't exist.
 #
 # Check the mkdir command with -p option.
-# RUN: rm -f -r %T/test
-# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
+# RUN: rm -f -r %t.test
+# RUN: %{python} %S/../check_path.py dir %t.test > %t.out
 # RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s
-# RUN: mkdir -p %T/test
-# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
+# RUN: mkdir -p %t.test
+# RUN: %{python} %S/../check_path.py dir %t.test > %t.out
 # RUN: FileCheck --check-prefix=MAKE-PARENT-DIR < %t.out %s
-# RUN: rm -f %T/test || true
-# RUN: rm -f -r %T/test
-# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
+# RUN: rm -f %t.test || true
+# RUN: rm -f -r %t.test
+# RUN: %{python} %S/../check_path.py dir %t.test > %t.out
 # RUN: FileCheck --check-prefix=REMOVE-PARENT-DIR < %t.out %s
 #
 # MAKE-PARENT-DIR: True
@@ -34,15 +34,15 @@
 #
 # Check the mkdir command without -p option.
 #
-# RUN: rm -rf %T/test1
-# RUN: mkdir %T/test1
-# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out
+# RUN: rm -rf %t.test1
+# RUN: mkdir %t.test1
+# RUN: %{python} %S/../check_path.py dir %t.test1 > %t.out
 # RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s
-# RUN: cd %T/test1 && mkdir foo
-# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out
+# RUN: cd %t.test1 && mkdir foo
+# RUN: %{python} %S/../check_path.py dir %t.test1 > %t.out
 # RUN: FileCheck --check-prefix=MAKE-DIR < %t.out %s
-# RUN: cd %T && rm -rf %T/test1
-# RUN: %{python} %S/../check_path.py dir %T/test1 > %t.out
+# RUN: cd .. && rm -rf %t.test1
+# RUN: %{python} %S/../check_path.py dir %t.test1 > %t.out
 # RUN: FileCheck --check-prefix=REMOVE-DIR < %t.out %s
 #
 # MAKE-DIR: True
@@ -50,18 +50,18 @@
 #
 # Check creating and removing multiple folders and rm * operation.
 #
-# RUN: rm -rf %T/test
-# RUN: mkdir -p %T/test/test1 %T/test/test2
-# RUN: %{python} %S/../check_path.py dir %T/test %T/test/test1 %T/test/test2 > %t.out
+# RUN: rm -rf %t.test
+# RUN: mkdir -p %t.test/test1 %t.test/test2
+# RUN: %{python} %S/../check_path.py dir %t.test %t.test/test1 %t.test/test2 > %t.out
 # RUN: FileCheck --check-prefix=DIRS-EXIST < %t.out %s
-# RUN: mkdir %T/test || true
-# RUN: echo "create a temp file" > %T/test/temp.write
-# RUN: echo "create a temp1 file" > %T/test/test1/temp1.write
-# RUN: echo "create a temp2 file" > %T/test/test2/temp2.write
-# RUN: %{python} %S/../check_path.py file %T/test/temp.write %T/test/test1/temp1.write %T/test/test2/temp2.write> %t.out
+# RUN: mkdir %t.test || true
+# RUN: echo "create a temp file" > %t.test/temp.write
+# RUN: echo "create a temp1 file" > %t.test/test1/temp1.write
+# RUN: echo "create a temp2 file" > %t.test/test2/temp2.write
+# RUN: %{python} %S/../check_path.py file %t.test/temp.write %t.test/test1/temp1.write %t.test/test2/temp2.write> %t.out
 # RUN: FileCheck --check-prefix=FILES-EXIST < %t.out %s
-# RUN: rm -r -f %T/*
-# RUN: %{python} %S/../check_path.py dir %T/test > %t.out
+# RUN: rm -r -f %t*
+# RUN: %{python} %S/../check_path.py dir %t.test > %t.out
 # RUN: FileCheck --check-prefix=REMOVE-ALL < %t.out %s
 #
 # DIRS-EXIST: True
@@ -81,7 +81,7 @@
 # RUN: echo "hello-2" > %t1.stdout
 # RUN: diff %t.stdout %t1.stdout || true
 #
-# RUN: mkdir -p %T/dir1 %T/dir2
-# RUN: cd %T/dir1 && echo "hello" > temp1.txt
-# RUN: cd %T/dir2 && echo "hello" > temp2.txt
-# RUN: diff temp2.txt ../dir1/temp1.txt
+# RUN: mkdir -p %t.dir1 %t.dir2
+# RUN: cd %t.dir1 && echo "hello" > temp1.txt
+# RUN: cd %t.dir2 && echo "hello" > temp2.txt
+# RUN: diff temp2.txt ../%{t:stem}.tmp.dir1/temp1.txt

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for cleaning this up!

Copy link
Collaborator

@jh7370 jh7370 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Created using spr 1.3.6

[skip ci]
Created using spr 1.3.6
@boomanaiden154 boomanaiden154 changed the base branch from users/boomanaiden154/main.lit-remove-t-from-tests to main September 26, 2025 22:49
@boomanaiden154 boomanaiden154 merged commit f8d547f into main Sep 26, 2025
10 of 15 checks passed
@boomanaiden154 boomanaiden154 deleted the users/boomanaiden154/lit-remove-t-from-tests branch September 26, 2025 22:49
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Sep 26, 2025
This patch removes %T from tests in preparation for removing the
substitution completely. Splitting this off from the actual removal to
make it easier to revert the removal of %T in case I missed something.

Reviewers: RKSimon, jh7370, cmtice, petrhosek, ilovepi, pogo59

Reviewed By: cmtice, RKSimon, jh7370

Pull Request: llvm/llvm-project#160027
schwitanski pushed a commit to RWTH-HPC/llvm-lit-mirror that referenced this pull request Sep 27, 2025
This patch removes %T from tests in preparation for removing the
substitution completely. Splitting this off from the actual removal to
make it easier to revert the removal of %T in case I missed something.

Reviewers: RKSimon, jh7370, cmtice, petrhosek, ilovepi, pogo59

Reviewed By: cmtice, RKSimon, jh7370

Pull Request: llvm/llvm-project#160027
YixingZhang007 pushed a commit to YixingZhang007/llvm-project that referenced this pull request Sep 27, 2025
This patch removes %T from tests in preparation for removing the
substitution completely. Splitting this off from the actual removal to
make it easier to revert the removal of %T in case I missed something.

Reviewers: RKSimon, jh7370, cmtice, petrhosek, ilovepi, pogo59

Reviewed By: cmtice, RKSimon, jh7370

Pull Request: llvm#160027
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
This patch removes %T from tests in preparation for removing the
substitution completely. Splitting this off from the actual removal to
make it easier to revert the removal of %T in case I missed something.

Reviewers: RKSimon, jh7370, cmtice, petrhosek, ilovepi, pogo59

Reviewed By: cmtice, RKSimon, jh7370

Pull Request: llvm#160027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants