Skip to content

Commit d9e8de8

Browse files
vnaraparmwasilew
authored andcommitted
Removed unwanted functions from testcases
Removed logging related functions at testcase level since it is duplicate code and already present in functestlib.sh Added functestlib.sh for IPA and RMNET as logging related functions log_pass/log_fail are defined in functestlib.sh Signed-off-by: Vamsee Narapareddi <[email protected]>
1 parent d7c9518 commit d9e8de8

File tree

2 files changed

+2
-37
lines changed
  • Runner/suites/Kernel/FunctionalArea/baseport

2 files changed

+2
-37
lines changed

Runner/suites/Kernel/FunctionalArea/baseport/IPA/run.sh

+1-18
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,7 @@
55
# Import test suite definitions
66
. $(pwd)/init_env
77
TESTNAME="IPA"
8-
#import test functions library
9-
log() {
10-
local level="$1"
11-
shift
12-
# echo "$(date '+%Y-%m-%d %H:%M:%S') - $message" | tee -a /var/test_framework.log
13-
echo "[$level] $(/bin/date '+%Y-%m-%d %H:%M:%S') - $*" | /usr/bin/tee -a /var/test_output.log
14-
}
15-
# Find test case path by name
16-
find_test_case_by_name() {
17-
local test_name="$1"
18-
find /var/Runner/suites -type d -name "$test_name" 2>/dev/null
19-
}
20-
# Logging levels
21-
log_info() { log "INFO" "$@"; }
22-
log_pass() { log "PASS" "$@"; }
23-
log_fail() { log "FAIL" "$@"; }
24-
log_error() { log "ERROR" "$@"; }
25-
8+
. "$TOOLS/functestlib.sh"
269
test_path=$(find_test_case_by_name "$TESTNAME")
2710
log_info "-----------------------------------------------------------------------------------------"
2811
log_info "-------------------Starting $TESTNAME Testcase----------------------------"

Runner/suites/Kernel/FunctionalArea/baseport/RMNET/run.sh

+1-19
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,7 @@
55
# Import test suite definitions
66
. $(pwd)/init_env
77
TESTNAME="RMNET"
8-
9-
#import test functions library
10-
log() {
11-
local level="$1"
12-
shift
13-
# echo "$(date '+%Y-%m-%d %H:%M:%S') - $message" | tee -a /var/test_framework.log
14-
echo "[$level] $(/bin/date '+%Y-%m-%d %H:%M:%S') - $*" | /usr/bin/tee -a /var/test_output.log
15-
}
16-
# Find test case path by name
17-
find_test_case_by_name() {
18-
local test_name="$1"
19-
find /var/Runner/suites -type d -name "$test_name" 2>/dev/null
20-
}
21-
# Logging levels
22-
log_info() { log "INFO" "$@"; }
23-
log_pass() { log "PASS" "$@"; }
24-
log_fail() { log "FAIL" "$@"; }
25-
log_error() { log "ERROR" "$@"; }
26-
8+
. "$TOOLS/functestlib.sh"
279
test_path=$(find_test_case_by_name "$TESTNAME")
2810
log_info "-----------------------------------------------------------------------------------------"
2911
log_info "-------------------Starting $TESTNAME Testcase----------------------------"

0 commit comments

Comments
 (0)