Skip to content
Snippets Groups Projects

Resolve L2SDP-1028

Merged Pieter Donker requested to merge L2SDP-1028 into master
1 file
+ 14
14
Compare changes
  • Side-by-side
  • Inline
@@ -34,12 +34,12 @@
@@ -34,12 +34,12 @@
# Run test from "fw_tests.txt" (--test)
# Run test from "fw_tests.txt" (--test)
# Send test response mail to adresses in "mailing_list.txt" (--send-mail).
# Send test response mail to adresses in "mailing_list.txt" (--send-mail).
#
#
# ./fw_regressiontest.sh --remote-ip=10.87.0.186
# ./fw_regressiontest.sh --remote-ip=10.87.0.186
# --sdptr-ip=10.99.0.250 --sdptr-port=4842 --sdptr
# --sdptr-ip=10.99.0.250 --sdptr-port=4842 --sdptr
# --rbf=<path to rbf file>
# --rbf=<path to rbf file>
#
#
# or (latest rbf build will be used from latest_rbf_file dir)
# or (latest rbf build will be used from latest_rbf_file dir)
# ./fw_regressiontest.sh --remote-ip=10.87.0.186
# ./fw_regressiontest.sh --remote-ip=10.87.0.186
# --sdptr-ip=10.99.0.250 --sdptr-port=4842 --sdptr
# --sdptr-ip=10.99.0.250 --sdptr-port=4842 --sdptr
###############################################################################
###############################################################################
@@ -263,7 +263,7 @@ restart_and_check_sdptr() {
@@ -263,7 +263,7 @@ restart_and_check_sdptr() {
sdptr_exec "$0" restart_sdptr
sdptr_exec "$0" restart_sdptr
let "n_restarts = n_restarts + 1"
let "n_restarts = n_restarts + 1"
sleep 20
sleep 20
# All processes should be started now.
# All processes should be started now.
echo "Check if same SDP translator versions"
echo "Check if same SDP translator versions"
sdptr_passed="true"
sdptr_passed="true"
@@ -277,7 +277,7 @@ restart_and_check_sdptr() {
@@ -277,7 +277,7 @@ restart_and_check_sdptr() {
echo "Error: SDP translator software version is not same"
echo "Error: SDP translator software version is not same"
sdptr_passed=
sdptr_passed=
fi
fi
# check if all nodes are in user image
# check if all nodes are in user image
sdp_boot=$(sdp_rw.py --host "${sdptr_ip}" --port "${sdptr_port}" -r boot_image)
sdp_boot=$(sdp_rw.py --host "${sdptr_ip}" --port "${sdptr_port}" -r boot_image)
[[ "${sdp_boot}" = *"-1"* ]] && boot_passed= || boot_passed="true"
[[ "${sdp_boot}" = *"-1"* ]] && boot_passed= || boot_passed="true"
@@ -297,11 +297,11 @@ look_for_passed() {
@@ -297,11 +297,11 @@ look_for_passed() {
passed=
passed=
while read -r line; do
while read -r line; do
if [[ -n "${line}" ]]; then
if [[ -n "${line}" ]]; then
[[ "${line}" = *"PASSED"* ]] && passed="true"
[[ "${line}" = *"PASSED"* ]] && passed="true"
[[ "${line}" = *"SUCCESS"* ]] && passed="true"
[[ "${line}" = *"SUCCESS"* ]] && passed="true"
fi
fi
done < ${logfile_nr}
done < ${logfile_nr}
# set back original nocasematch
# set back original nocasematch
$orig_nocasematch
$orig_nocasematch
echo "${passed}"
echo "${passed}"
@@ -315,11 +315,11 @@ look_for_failed() {
@@ -315,11 +315,11 @@ look_for_failed() {
failed=
failed=
while read -r line; do
while read -r line; do
if [[ -n "${line}" ]]; then
if [[ -n "${line}" ]]; then
[[ "${line}" = *"FAILED"* ]] && failed="true"
[[ "${line}" = *"FAILED"* ]] && failed="true"
[[ "${line}" = *"FAILURE"* ]] && failed="true"
[[ "${line}" = *"FAILURE"* ]] && failed="true"
[[ "${line}" = *"ERROR"* ]] && [[ "${line}" != *"_error_"* ]] && failed="true"
[[ "${line}" = *"ERROR"* ]] && [[ "${line}" != *"_error"* ]] && failed="true"
fi
fi
done < ${logfile_nr}
done < ${logfile_nr}
# set back original nocasematch
# set back original nocasematch
$orig_nocasematch
$orig_nocasematch
@@ -333,12 +333,12 @@ run_test() {
@@ -333,12 +333,12 @@ run_test() {
echo "===============================" >> ${MAILFILE}
echo "===============================" >> ${MAILFILE}
test_passed="true"
test_passed="true"
test_nr=0
test_nr=0
# substitude env variables
# substitude env variables
envsubst < ${TESTFILE} > ${EXPTESTFILE}
envsubst < ${TESTFILE} > ${EXPTESTFILE}
# skip lines starting with #
# skip lines starting with #
grep -v '^#' < ${EXPTESTFILE} > ${EXPTESTFILE_CLEAN}
grep -v '^#' < ${EXPTESTFILE} > ${EXPTESTFILE_CLEAN}
while read -r line; do
while read -r line; do
if [[ -n "${line}" ]]; then
if [[ -n "${line}" ]]; then
let "test_nr = test_nr + 1"
let "test_nr = test_nr + 1"
@@ -385,7 +385,7 @@ else
@@ -385,7 +385,7 @@ else
[[ -z "${test}" ]] && test_passed="false"
[[ -z "${test}" ]] && test_passed="false"
kill_old_procs
kill_old_procs
# run selected options, on error *_passed is empty
# run selected options, on error *_passed is empty
[[ -n "${flash}" ]] && flash_fw && reload_fw
[[ -n "${flash}" ]] && flash_fw && reload_fw
[[ -n "${reload_passed}" ]] && [[ -n "${sdptr}" ]] && build_sdptr && restart_and_check_sdptr
[[ -n "${reload_passed}" ]] && [[ -n "${sdptr}" ]] && build_sdptr && restart_and_check_sdptr
Loading