From 71bc1a5679eae65584e3c3d4f9202138db1d6a64 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Wed, 19 Apr 2023 14:17:31 -0400 Subject: [PATCH] Support passing in test names instead of files. --- scripts/run_integration_test.bash | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/run_integration_test.bash b/scripts/run_integration_test.bash index bfb10291..9b19ecc3 100755 --- a/scripts/run_integration_test.bash +++ b/scripts/run_integration_test.bash @@ -11,10 +11,14 @@ samples_dir=$(readlink -f "org_mode_samples") function get_test_names { for test_file in "$@" do - test_file_full_path=$(readlink -f "$test_file") - relative_to_samples=$(realpath --relative-to "$samples_dir" "$test_file_full_path") - without_extension="${relative_to_samples%.org}" - echo "${without_extension/\//_}" + if [ -e "$test_file" ]; then + test_file_full_path=$(readlink -f "$test_file") + relative_to_samples=$(realpath --relative-to "$samples_dir" "$test_file_full_path") + without_extension="${relative_to_samples%.org}" + echo "${without_extension/\//_}" + else + echo "$test_file" + fi done }