[llvm] [llvm-lit] Add precommit test to verify current behavior of glob expansion in lit's internal shell (PR #106325)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 16:34:11 PDT 2024


================
@@ -0,0 +1,13 @@
+## Tests glob pattern handling in echo command.
+
+# RUN: not %{lit} -a -v %{inputs}/shtest-glob \ 
+# RUN: | FileCheck -dump-input=fail -match-full-lines %s
+#
+# END.
+
+# CHECK: UNRESOLVED: shtest-glob :: glob-echo.txt ({{[^)]*}})
+# CHECK: TypeError: string argument expected, got 'GlobItem'
+
+# CHECK: FAIL: shtest-glob :: glob-mkdir.txt ({{[^)]*}})
+# CHECK: # error: command failed with exit status: 1
----------------
arichardson wrote:

I was surprised there is no more specific error here but it looks like the builtin mkdir does not print any output right now. Turns out it doesn't handle EEXISTS the same way as the real mkdir command. I can submit a patch for this once this commit lands.

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


More information about the llvm-commits mailing list