ref: 2823b295df4a95dc7ebf3e49c9b0a6fac97efe92
parent: 733a8e7f139108baf0988320552c8ae3508baf40
parent: 3d38cf9c12d9b9dfa9e4b707ec80ed98d6827b60
author: Tom Finegan <tomfinegan@google.com>
date: Tue May 20 11:47:51 EDT 2014
Merge "tools_common.sh: Allow over ride of test name."
--- a/test/tools_common.sh
+++ b/test/tools_common.sh
@@ -302,9 +302,14 @@
# functions and are run unconditionally. Functions in positional parameter two
# are run according to the rules specified in vpx_test_usage().
run_tests() {- env_tests="verify_vpx_test_environment ${1}"- tests_to_filter="${2}"+ local env_tests="verify_vpx_test_environment $1"
+ local tests_to_filter="$2"
+ local test_name="${VPX_TEST_NAME}"+ if [ -z "${test_name}" ]; then+ test_name="$(basename \"${0%.*}\")"+ fi
+
if [ "${VPX_TEST_RUN_DISABLED_TESTS}" != "yes" ]; then# Filter out DISABLED tests.
tests_to_filter=$(filter_strings "${tests_to_filter}" ^DISABLED exclude)@@ -315,7 +320,7 @@
tests_to_filter=$(filter_strings "${tests_to_filter}" ${VPX_TEST_FILTER})fi
- tests_to_run="${env_tests} ${tests_to_filter}"+ local tests_to_run="${env_tests} ${tests_to_filter}"check_git_hashes
@@ -328,8 +333,8 @@
test_end "${test}"done
- tested_config="$(test_configuration_target) @ $(current_hash)"
- echo $(basename "${0%.*}"): Done, all tests pass for ${tested_config}.+ local tested_config="$(test_configuration_target) @ $(current_hash)"
+ echo "${test_name}: Done, all tests pass for ${tested_config}."}
vpx_test_usage() {--
⑨