[lit] Fix `not` calling internal commandsWithout this patch, when using lit's internal shell, if `not` on a litRUN line calls `env`, `diff`, or any of the other in-process shellbuiltins that lit
[lit] Fix `not` calling internal commandsWithout this patch, when using lit's internal shell, if `not` on a litRUN line calls `env`, `diff`, or any of the other in-process shellbuiltins that lit implements, lit accidentally searches for the latteras an external executable. What's worse is that works fine when adeveloper is testing on a platform where those executables areavailable and behave as expected, but it then breaks on otherplatforms.`not` seems useful for some builtins, such as `diff`, so this patchsupports such uses. `not --crash` does not seem useful for builtins,so this patch diagnoses such uses. In all cases, this patch ensuresshell builtins are found behind any sequence of `env` and `not`commands.`not` calling `env` calling an external command appears useful whenthe `env` and external command are part of a lit substitution, as inD65156. This patch supports that by looking through any sequence of`env` and `not` commands, building the environment from the `env`s,and storing the `not`s. The `not`s are then added back to the commandline without the `env`s to execute externally. This avoids the needto replicate the `not` implementation, in particular the `--crash`option, in lit.Reviewed By: rnkDifferential Revision: https://reviews.llvm.org/D66531
show more ...
[lit] Fix internal env calling envWithout this patch, when using lit's internal shell, if `env` on a litRUN line calls `env`, lit accidentally searches for the latter as anexternal executable. W
[lit] Fix internal env calling envWithout this patch, when using lit's internal shell, if `env` on a litRUN line calls `env`, lit accidentally searches for the latter as anexternal executable. What's worse is that works fine when a developeris testing on a platform where `env` is available and behaves asexpected, but it then breaks on other platforms.`env` calling `env` can make sense if one such `env` is within a litsubstitution, as in D65156 and D65121. This patch ensures that litexecutes both as internal commands.Reviewed By: probinson, mgorny, rnkDifferential Revision: https://reviews.llvm.org/D65697
[lit] Fix internal env calling other internal commandsWithout this patch, when using lit's internal shell, if `env` on a litRUN line calls `cd`, `mkdir`, or any of the other in-process shellbuilt
[lit] Fix internal env calling other internal commandsWithout this patch, when using lit's internal shell, if `env` on a litRUN line calls `cd`, `mkdir`, or any of the other in-process shellbuiltins that lit implements, lit accidentally searches for the latteras an external executable.This patch puts such builtins in a map so that boilerplate for themneed be implemented only once. This patch moves that handling afterprocessing of `env` so that `env` calling such a builtin can bedetected. Finally, because such calls appear to be useless, thispatch takes the safe approach of diagnosing them rather thansupporting them.Reviewed By: probinson, mgorny, rnkDifferential Revision: https://reviews.llvm.org/D66506
[lit] Diagnose insufficient args to internal envWithout this patch, failing to provide a subcommand to lit's internal`env` results in either a python `IndexError` or an attempt to executethe fina
[lit] Diagnose insufficient args to internal envWithout this patch, failing to provide a subcommand to lit's internal`env` results in either a python `IndexError` or an attempt to executethe final `env` argument, such as `FOO=1`, as a command. This patchdiagnoses those cases with a more helpful message.Reviewed By: stella.stamenovaDifferential Revision: https://reviews.llvm.org/D66482llvm-svn: 369620
[lit] Actually run tests for internal env commandPut the main test script in the right directory, and fix a python bugin a local script.Reviewed By: stella.stamenovaDifferential Revision: http
[lit] Actually run tests for internal env commandPut the main test script in the right directory, and fix a python bugin a local script.Reviewed By: stella.stamenovaDifferential Revision: https://reviews.llvm.org/D65623llvm-svn: 367751
Python compat - print statementMake sure all print statements are compatible with Python 2 and Python3 usingthe `from __future__ import print_function` statement.Differential Revision: https://r
Python compat - print statementMake sure all print statements are compatible with Python 2 and Python3 usingthe `from __future__ import print_function` statement.Differential Revision: https://reviews.llvm.org/D56249llvm-svn: 350307
[lit, python3] Update lit error logging to work correctly in python3 and other test fixesSummary:In Python2 'unicode' is a distinct type from 'str', but in Python3 'unicode' does not exist and ins
[lit, python3] Update lit error logging to work correctly in python3 and other test fixesSummary:In Python2 'unicode' is a distinct type from 'str', but in Python3 'unicode' does not exist and instead all 'str' objects are Unicode string. This change updates the logic in the test logging for lit to correctly process each of the types, and more importantly, to not just fail in Python3.This change also reverses the use of quotes in several of the cfg files. By using '""' we are guaranteeing that the resulting path will work correctly on Windows while "''" only works correctly sometimes. This also fixes one of the failing tests.Reviewers: asmith, zturnerSubscribers: stella.stamenova, delcypher, llvm-commitsDifferential Revision: https://reviews.llvm.org/D50397llvm-svn: 339179
[lit, python] Always add quotes around the python path in litSummary:The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the pat
[lit, python] Always add quotes around the python path in litSummary:The issue with the python path is that the path to python on Windows can contain spaces. To make the tests always work, the path to python needs to be surrounded by quotes.This change updates several configuration files which specify the path to python as a substitution and also remove quotes from existing tests.Reviewers: asmith, zturner, alexshap, jakehehrlichReviewed By: zturner, alexshap, jakehehrlichSubscribers: mehdi_amini, nemanjai, eraman, kbarton, jakehehrlich, steven_wu, dexonsmith, stella.stamenova, delcypher, llvm-commitsDifferential Revision: https://reviews.llvm.org/D50206llvm-svn: 339073
[lit] support unsetting env variables (again!)This is an updated version of https://reviews.llvm.org/D22144 by @jlpeyton.The patch was accepted but not landed.This is useful functionality and I
[lit] support unsetting env variables (again!)This is an updated version of https://reviews.llvm.org/D22144 by @jlpeyton.The patch was accepted but not landed.This is useful functionality and I would like to use this to enable lit tests for environment variable behaviour.Differential Revision: https://reviews.llvm.org/D36403llvm-svn: 311180