diff options
author | Anish Athalye <me@anishathalye.com> | 2020-01-03 15:20:00 -0500 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2020-01-03 15:34:46 -0500 |
commit | 6d24613b0b453e546fa4e9defc695d8f982743c9 (patch) | |
tree | 7e5124b2606284ef761cd69fcb8892d0038d297d /test/tests/find-python-executable.bash | |
parent | 1e1885c45a28190dc1cbde993a9ddcf1729ee4d1 (diff) |
Unify Vagrant and Travis-CI tests
This patch makes the tests (including the test driver) run entirely
inside Vagrant, which avoids calling the very slow `vagrant` driver many
times for running the tests. On my machine, `./test` runs in 22 seconds,
down from hundreds of seconds prior to this patch.
This also has the nice side effect of matching how the Travis CI tests
were run, so there's no need for a separate `test_travis` anymore.
Diffstat (limited to 'test/tests/find-python-executable.bash')
-rw-r--r-- | test/tests/find-python-executable.bash | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/tests/find-python-executable.bash b/test/tests/find-python-executable.bash index 9a91a74..561b882 100644 --- a/test/tests/find-python-executable.bash +++ b/test/tests/find-python-executable.bash @@ -1,18 +1,16 @@ test_description='can find python executable with different names' . '../test-lib.bash' -if ${USE_VAGRANT}; then - DOTBOT_EXEC="/dotbot/bin/dotbot" # revert to calling it as a shell script -fi - # the test machine needs to have a binary named `python` test_expect_success 'setup' ' mkdir ~/tmp_bin && ( IFS=: for p in $PATH; do - find $p -maxdepth 1 -mindepth 1 -exec sh -c \ + if [ -d $p ]; then + find $p -maxdepth 1 -mindepth 1 -exec sh -c \ '"'"'ln -sf {} $HOME/tmp_bin/$(basename {})'"'"' \; + fi done ) && rm -f ~/tmp_bin/python && |