Skip to content

Commit 377a8b4

Browse files
authored
Merge pull request #43 from mwasilew/use-local-path
Use current directory in case suite is not installed
2 parents 2d02349 + b119062 commit 377a8b4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Runner/utils/functestlib.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ log() {
2121
# Find test case path by name
2222
find_test_case_by_name() {
2323
local test_name="$1"
24-
find $__RUNNER_SUITES_DIR -type d -iname "$test_name" 2>/dev/null
24+
if [ -d "$__RUNNER_SUITES_DIR" ]; then
25+
find $__RUNNER_SUITES_DIR -type d -iname "$test_name" 2>/dev/null
26+
else
27+
find "${PWD}" -type d -iname "$test_name" 2>/dev/null
28+
fi
2529
}
2630

2731
# Find test case path by name
@@ -33,7 +37,11 @@ find_test_case_bin_by_name() {
3337
# Find test case path by name
3438
find_test_case_script_by_name() {
3539
local test_name="$1"
36-
find $__RUNNER_UTILS_BIN_DIR -type d -iname "$test_name" 2>/dev/null
40+
if [ -d "$__RUNNER_UTILS_BIN_DIR" ]; then
41+
find $__RUNNER_UTILS_BIN_DIR -type d -iname "$test_name" 2>/dev/null
42+
else
43+
find "${PWD}" -type d -iname "$test_name" 2>/dev/null
44+
fi
3745
}
3846

3947
check_dependencies() {

0 commit comments

Comments
 (0)