25 lines
649 B
Bash
Executable File
25 lines
649 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
savetest() {
|
|
local target_file=
|
|
local environment=
|
|
local failed_tests=0
|
|
|
|
readonly savetest_dir="$(cd "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
|
|
|
|
target_dir="${savetest_dir}/results"
|
|
mkdir -p "${target_dir}"
|
|
|
|
environment="$("${savetest_dir}/getenv.sh")"
|
|
target_file="${target_dir}/${environment:-"Unknown_Environemnt"}_result.log"
|
|
|
|
printf "# Test environment\n\n %s\n\n" "${environment}" >"${target_file}"
|
|
|
|
"${savetest_dir}/test_rdlink.sh" -a >>"${target_file}" 2>&1
|
|
failed_tests="$?"
|
|
(( failed_tests )) && printf "Failed tests: %s\n" "$failed_tests"
|
|
return $failed_tests
|
|
}
|
|
|
|
savetest
|