[Lit] Add pushd and popd builtins
authorDavid Goldman <davg@google.com>
Thu, 12 May 2022 20:32:29 +0000 (16:32 -0400)
committerDavid Goldman <davg@google.com>
Thu, 12 May 2022 23:24:30 +0000 (19:24 -0400)
commite91a73de24d60954700d7ac0293c050ab2cbe90b
treed846a9108321a4131b9770527d5053ddf81b72ba
parentb1aed14bfea07508e4b9d864168c1ae6b5b5c665
[Lit] Add pushd and popd builtins

This behaves just like the sh/cmd.exe equivalents.

pushd/popd are useful to verify path handling of the driver,
typically testing prefix maps or relative path handling.

Differential Revision: https://reviews.llvm.org/D125502
llvm/utils/lit/lit/TestRunner.py
llvm/utils/lit/tests/Inputs/shtest-pushd-popd/lit.cfg [new file with mode: 0644]
llvm/utils/lit/tests/Inputs/shtest-pushd-popd/popd-args.txt [new file with mode: 0644]
llvm/utils/lit/tests/Inputs/shtest-pushd-popd/popd-no-stack.txt [new file with mode: 0644]
llvm/utils/lit/tests/Inputs/shtest-pushd-popd/pushd-popd-ok.txt [new file with mode: 0644]
llvm/utils/lit/tests/Inputs/shtest-pushd-popd/pushd-too-many-args.txt [new file with mode: 0644]
llvm/utils/lit/tests/shtest-pushd-popd.py [new file with mode: 0644]