]> granicus.if.org Git - llvm/commit
[lit] Diagnose insufficient args to internal env
authorJoel E. Denny <jdenny.ornl@gmail.com>
Thu, 22 Aug 2019 03:42:01 +0000 (03:42 +0000)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Thu, 22 Aug 2019 03:42:01 +0000 (03:42 +0000)
commit55c65a7a9a37a5d7a0d4f227a32068d17de811ba
tree733362001222016146b5f063bbbc9058ed5407e7
parent97e1bc20db363d45bf59659b1848357865116e96
[lit] Diagnose insufficient args to internal env

Without this patch, failing to provide a subcommand to lit's internal
`env` results in either a python `IndexError` or an attempt to execute
the final `env` argument, such as `FOO=1`, as a command.  This patch
diagnoses those cases with a more helpful message.

Reviewed By: stella.stamenova

Differential Revision: https://reviews.llvm.org/D66482

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369620 91177308-0d34-0410-b5e6-96231b3b80d8
utils/lit/lit/TestRunner.py
utils/lit/tests/Inputs/shtest-env/env-args-last-is-assign.txt [new file with mode: 0644]
utils/lit/tests/Inputs/shtest-env/env-args-last-is-u-arg.txt [new file with mode: 0644]
utils/lit/tests/Inputs/shtest-env/env-args-last-is-u.txt [new file with mode: 0644]
utils/lit/tests/Inputs/shtest-env/env-args-none.txt [new file with mode: 0644]
utils/lit/tests/shtest-env.py