diff options
author | Matthias Devlamynck <matthias.devlamynck@mailoo.org> | 2020-10-04 12:07:22 +0200 |
---|---|---|
committer | Matthias Devlamynck <matthias.devlamynck@mailoo.org> | 2020-10-04 19:35:32 +0200 |
commit | 12340c1d10659df2f1b84a7040fa293b6b853b76 (patch) | |
tree | b47aeb9108d918d6f15015cf0f5f857ea8429d89 /tests | |
parent | b50bd587954e8467cf6141b8c86ca416e74fb26c (diff) |
Add change dir to script dir to allow running from project root dir
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/benchmarks/comparison.sh | 2 | ||||
-rwxr-xr-x | tests/benchmarks/run-benchmarks.sh | 2 | ||||
-rwxr-xr-x | tests/syntax-tests/update.sh | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/benchmarks/comparison.sh b/tests/benchmarks/comparison.sh index be188293..c9eb5237 100755 --- a/tests/benchmarks/comparison.sh +++ b/tests/benchmarks/comparison.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +cd "$(dirname "${BASH_SOURCE[0]}")" + if ! which hyperfine > /dev/null 2>&1; then echo "'hyperfine' does not seem to be installed." echo "You can get it here: https://github.com/sharkdp/hyperfine" diff --git a/tests/benchmarks/run-benchmarks.sh b/tests/benchmarks/run-benchmarks.sh index 95dd420c..c3a15509 100755 --- a/tests/benchmarks/run-benchmarks.sh +++ b/tests/benchmarks/run-benchmarks.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +cd "$(dirname "${BASH_SOURCE[0]}")" + if ! which hyperfine > /dev/null 2>&1; then echo "'hyperfine' does not seem to be installed." echo "You can get it here: https://github.com/sharkdp/hyperfine" diff --git a/tests/syntax-tests/update.sh b/tests/syntax-tests/update.sh index beb16ffa..b4752f05 100755 --- a/tests/syntax-tests/update.sh +++ b/tests/syntax-tests/update.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +cd "$(dirname "${BASH_SOURCE[0]}")" + python="python3" if ! command -v python3 &>/dev/null; then python="python"; fi "$python" create_highlighted_versions.py -O highlighted |