You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
595 B
35 lines
595 B
1 year ago
|
#!/bin/bash
|
||
|
|
||
|
set -uo pipefail
|
||
|
|
||
|
|
||
|
function check_test_status {
|
||
|
local exit_code=$?
|
||
|
if [ ${1} -ne 0 ]; then
|
||
|
echo "test [FAILED]: $2 Code: $1"
|
||
|
else
|
||
|
echo "test [PASSED]: $2"
|
||
|
fi
|
||
|
return ${exit_code}
|
||
|
}
|
||
|
|
||
|
function eq_is_success {
|
||
|
local exit_code=$?
|
||
|
local check=$1
|
||
|
if [[ ${exit_code} -ne ${2} ]]; then
|
||
|
let check+=1
|
||
|
fi
|
||
|
echo ${check}
|
||
|
return ${exit_code}
|
||
|
}
|
||
|
|
||
|
function not_eq_is_success {
|
||
|
local exit_code=$?
|
||
|
local check=$1
|
||
|
if [[ ${exit_code} -eq ${2} ]]; then
|
||
|
let check+=1
|
||
|
fi
|
||
|
echo ${check}
|
||
|
return ${exit_code}
|
||
|
}
|