Commit 97aa09f6 authored by Yaowu Xu's avatar Yaowu Xu

LIBVPX_TEST_DATA_PATH -> LIBAOM_TEST_DATA_PATH

This commit renames LIBVPX_TEST_DATA_PATH to LIBAOM_TEST_DATA_PATH,
with a work around for working with jenkins environmnet variables.

Change-Id: If664ce57e25ad2af8121d1b578bf64043f0baa2a
parent 445ae93e
...@@ -122,10 +122,10 @@ COMPILING THE APPLICATIONS/LIBRARIES: ...@@ -122,10 +122,10 @@ COMPILING THE APPLICATIONS/LIBRARIES:
VP8/AV1 TEST VECTORS: VP8/AV1 TEST VECTORS:
The test vectors can be downloaded and verified using the build system after The test vectors can be downloaded and verified using the build system after
running configure. To specify an alternate directory the running configure. To specify an alternate directory the
LIBVPX_TEST_DATA_PATH environment variable can be used. LIBAOM_TEST_DATA_PATH environment variable can be used.
$ ./configure --enable-unit-tests $ ./configure --enable-unit-tests
$ LIBVPX_TEST_DATA_PATH=../-test-data make testdata $ LIBAOM_TEST_DATA_PATH=../-test-data make testdata
CODE STYLE: CODE STYLE:
The coding style used by this project is enforced with clang-format using the The coding style used by this project is enforced with clang-format using the
......
...@@ -164,7 +164,6 @@ struct macroblock { ...@@ -164,7 +164,6 @@ struct macroblock {
// Store the second best motion vector during full-pixel motion search // Store the second best motion vector during full-pixel motion search
int_mv second_best_mv; int_mv second_best_mv;
// use default transform and skip transform type search for intra modes // use default transform and skip transform type search for intra modes
int use_default_intra_tx_type; int use_default_intra_tx_type;
// use default transform and skip transform type search for inter modes // use default transform and skip transform type search for inter modes
......
...@@ -356,12 +356,12 @@ endif ...@@ -356,12 +356,12 @@ endif
## libaom test directives ## libaom test directives
## ##
ifeq ($(CONFIG_UNIT_TESTS),yes) ifeq ($(CONFIG_UNIT_TESTS),yes)
LIBVPX_TEST_DATA_PATH ?= . LIBAOM_TEST_DATA_PATH ?= .
include $(SRC_PATH_BARE)/test/test.mk include $(SRC_PATH_BARE)/test/test.mk
LIBAOM_TEST_SRCS=$(addprefix test/,$(call enabled,LIBAOM_TEST_SRCS)) LIBAOM_TEST_SRCS=$(addprefix test/,$(call enabled,LIBAOM_TEST_SRCS))
LIBAOM_TEST_BIN=./test_libaom$(EXE_SFX) LIBAOM_TEST_BIN=./test_libaom$(EXE_SFX)
LIBAOM_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\ LIBAOM_TEST_DATA=$(addprefix $(LIBAOM_TEST_DATA_PATH)/,\
$(call enabled,LIBAOM_TEST_DATA)) $(call enabled,LIBAOM_TEST_DATA))
libaom_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1) libaom_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1)
...@@ -388,7 +388,7 @@ testdata:: $(LIBAOM_TEST_DATA) ...@@ -388,7 +388,7 @@ testdata:: $(LIBAOM_TEST_DATA)
echo "Checking test data:";\ echo "Checking test data:";\
for f in $(call enabled,LIBAOM_TEST_DATA); do\ for f in $(call enabled,LIBAOM_TEST_DATA); do\
grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\ grep $$f $(SRC_PATH_BARE)/test/test-data.sha1 |\
(cd $(LIBVPX_TEST_DATA_PATH); $${sha1sum} -c);\ (cd $(LIBAOM_TEST_DATA_PATH); $${sha1sum} -c);\
done; \ done; \
else\ else\
echo "Skipping test data integrity check, sha1sum not found.";\ echo "Skipping test data integrity check, sha1sum not found.";\
...@@ -554,10 +554,10 @@ TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH)) ...@@ -554,10 +554,10 @@ TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
endif endif
utiltest utiltest-no-data-check: utiltest utiltest-no-data-check:
$(qexec)$(SRC_PATH_BARE)/test/aomdec.sh \ $(qexec)$(SRC_PATH_BARE)/test/aomdec.sh \
--test-data-path $(LIBVPX_TEST_DATA_PATH) \ --test-data-path $(LIBAOM_TEST_DATA_PATH) \
--bin-path $(TEST_BIN_PATH) --bin-path $(TEST_BIN_PATH)
$(qexec)$(SRC_PATH_BARE)/test/aomenc.sh \ $(qexec)$(SRC_PATH_BARE)/test/aomenc.sh \
--test-data-path $(LIBVPX_TEST_DATA_PATH) \ --test-data-path $(LIBAOM_TEST_DATA_PATH) \
--bin-path $(TEST_BIN_PATH) --bin-path $(TEST_BIN_PATH)
utiltest: testdata utiltest: testdata
else else
...@@ -581,7 +581,7 @@ EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release ...@@ -581,7 +581,7 @@ EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
endif endif
exampletest exampletest-no-data-check: examples exampletest exampletest-no-data-check: examples
$(qexec)$(SRC_PATH_BARE)/test/examples.sh \ $(qexec)$(SRC_PATH_BARE)/test/examples.sh \
--test-data-path $(LIBVPX_TEST_DATA_PATH) \ --test-data-path $(LIBAOM_TEST_DATA_PATH) \
--bin-path $(EXAMPLES_BIN_PATH) --bin-path $(EXAMPLES_BIN_PATH)
exampletest: testdata exampletest: testdata
else else
......
...@@ -20,7 +20,7 @@ aomdec_verify_environment() { ...@@ -20,7 +20,7 @@ aomdec_verify_environment() {
if [ ! -e "${AV1_WEBM_FILE}" ] || \ if [ ! -e "${AV1_WEBM_FILE}" ] || \
[ ! -e "${AV1_FPM_WEBM_FILE}" ] || \ [ ! -e "${AV1_FPM_WEBM_FILE}" ] || \
[ ! -e "${AV1_LT_50_FRAMES_WEBM_FILE}" ] ; then [ ! -e "${AV1_LT_50_FRAMES_WEBM_FILE}" ] ; then
elog "Libaom test data must exist in LIBVPX_TEST_DATA_PATH." elog "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
return 1 return 1
fi fi
fi fi
......
...@@ -20,13 +20,13 @@ readonly TEST_FRAMES=10 ...@@ -20,13 +20,13 @@ readonly TEST_FRAMES=10
# Environment check: Make sure input is available. # Environment check: Make sure input is available.
aomenc_verify_environment() { aomenc_verify_environment() {
if [ ! -e "${YUV_RAW_INPUT}" ]; then if [ ! -e "${YUV_RAW_INPUT}" ]; then
elog "The file ${YUV_RAW_INPUT##*/} must exist in LIBVPX_TEST_DATA_PATH." elog "The file ${YUV_RAW_INPUT##*/} must exist in LIBAOM_TEST_DATA_PATH."
return 1 return 1
fi fi
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
if [ ! -e "${Y4M_NOSQ_PAR_INPUT}" ]; then if [ ! -e "${Y4M_NOSQ_PAR_INPUT}" ]; then
elog "The file ${Y4M_NOSQ_PAR_INPUT##*/} must exist in" elog "The file ${Y4M_NOSQ_PAR_INPUT##*/} must exist in"
elog "LIBVPX_TEST_DATA_PATH." elog "LIBAOM_TEST_DATA_PATH."
return 1 return 1
fi fi
fi fi
......
...@@ -147,7 +147,7 @@ class AV1NewEncodeDecodePerfTest ...@@ -147,7 +147,7 @@ class AV1NewEncodeDecodePerfTest
} }
virtual void BeginPassHook(unsigned int /*pass*/) { virtual void BeginPassHook(unsigned int /*pass*/) {
const std::string data_path = getenv("LIBVPX_TEST_DATA_PATH"); const std::string data_path = getenv("LIBAOM_TEST_DATA_PATH");
const std::string path_to_source = data_path + "/" + kNewEncodeOutputFile; const std::string path_to_source = data_path + "/" + kNewEncodeOutputFile;
outfile_ = fopen(path_to_source.c_str(), "wb"); outfile_ = fopen(path_to_source.c_str(), "wb");
ASSERT_TRUE(outfile_ != NULL); ASSERT_TRUE(outfile_ != NULL);
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
# $LIBAOM_BIN_PATH. # $LIBAOM_BIN_PATH.
set_maps_verify_environment() { set_maps_verify_environment() {
if [ ! -e "${YUV_RAW_INPUT}" ]; then if [ ! -e "${YUV_RAW_INPUT}" ]; then
echo "Libaom test data must exist in LIBVPX_TEST_DATA_PATH." echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
return 1 return 1
fi fi
if [ -z "$(aom_tool_path set_maps)" ]; then if [ -z "$(aom_tool_path set_maps)" ]; then
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# Environment check: $YUV_RAW_INPUT is required. # Environment check: $YUV_RAW_INPUT is required.
simple_encoder_verify_environment() { simple_encoder_verify_environment() {
if [ ! -e "${YUV_RAW_INPUT}" ]; then if [ ! -e "${YUV_RAW_INPUT}" ]; then
echo "Libaom test data must exist in LIBVPX_TEST_DATA_PATH." echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
return 1 return 1
fi fi
} }
......
...@@ -118,12 +118,12 @@ test_env_var_dir() { ...@@ -118,12 +118,12 @@ test_env_var_dir() {
} }
# This script requires that the LIBAOM_BIN_PATH, LIBAOM_CONFIG_PATH, and # This script requires that the LIBAOM_BIN_PATH, LIBAOM_CONFIG_PATH, and
# LIBVPX_TEST_DATA_PATH variables are in the environment: Confirm that # LIBAOM_TEST_DATA_PATH variables are in the environment: Confirm that
# the variables are set and that they all evaluate to directory paths. # the variables are set and that they all evaluate to directory paths.
verify_aom_test_environment() { verify_aom_test_environment() {
test_env_var_dir "LIBAOM_BIN_PATH" \ test_env_var_dir "LIBAOM_BIN_PATH" \
&& test_env_var_dir "LIBAOM_CONFIG_PATH" \ && test_env_var_dir "LIBAOM_CONFIG_PATH" \
&& test_env_var_dir "LIBVPX_TEST_DATA_PATH" && test_env_var_dir "LIBAOM_TEST_DATA_PATH"
} }
# Greps aom_config.h in LIBAOM_CONFIG_PATH for positional parameter one, which # Greps aom_config.h in LIBAOM_CONFIG_PATH for positional parameter one, which
...@@ -295,7 +295,7 @@ cat << EOF ...@@ -295,7 +295,7 @@ cat << EOF
\$LIBAOM_CONFIG_PATH and then the current directory. \$LIBAOM_CONFIG_PATH and then the current directory.
When the -test-data-path option is not specified the script attempts to use When the -test-data-path option is not specified the script attempts to use
\$LIBVPX_TEST_DATA_PATH and then the current directory. \$LIBAOM_TEST_DATA_PATH and then the current directory.
EOF EOF
} }
...@@ -304,7 +304,7 @@ EOF ...@@ -304,7 +304,7 @@ EOF
aom_test_check_environment() { aom_test_check_environment() {
if [ -z "${LIBAOM_BIN_PATH}" ] || \ if [ -z "${LIBAOM_BIN_PATH}" ] || \
[ -z "${LIBAOM_CONFIG_PATH}" ] || \ [ -z "${LIBAOM_CONFIG_PATH}" ] || \
[ -z "${LIBVPX_TEST_DATA_PATH}" ]; then [ -z "${LIBAOM_TEST_DATA_PATH}" ]; then
return 1 return 1
fi fi
} }
...@@ -360,7 +360,7 @@ while [ -n "$1" ]; do ...@@ -360,7 +360,7 @@ while [ -n "$1" ]; do
exit exit
;; ;;
--test-data-path) --test-data-path)
LIBVPX_TEST_DATA_PATH="$2" LIBAOM_TEST_DATA_PATH="$2"
shift shift
;; ;;
--prefix) --prefix)
...@@ -388,7 +388,7 @@ done ...@@ -388,7 +388,7 @@ done
# the tests on *nix/macosx. # the tests on *nix/macosx.
LIBAOM_BIN_PATH="${LIBAOM_BIN_PATH:-.}" LIBAOM_BIN_PATH="${LIBAOM_BIN_PATH:-.}"
LIBAOM_CONFIG_PATH="${LIBAOM_CONFIG_PATH:-.}" LIBAOM_CONFIG_PATH="${LIBAOM_CONFIG_PATH:-.}"
LIBVPX_TEST_DATA_PATH="${LIBVPX_TEST_DATA_PATH:-.}" LIBAOM_TEST_DATA_PATH="${LIBAOM_TEST_DATA_PATH:-.}"
# Create a temporary directory for output files, and a trap to clean it up. # Create a temporary directory for output files, and a trap to clean it up.
if [ -n "${TMPDIR}" ]; then if [ -n "${TMPDIR}" ]; then
...@@ -413,19 +413,19 @@ if [ "$(is_windows_target)" = "yes" ]; then ...@@ -413,19 +413,19 @@ if [ "$(is_windows_target)" = "yes" ]; then
fi fi
# Variables shared by tests. # Variables shared by tests.
VP8_IVF_FILE="${LIBVPX_TEST_DATA_PATH}/vp80-00-comprehensive-001.ivf" VP8_IVF_FILE="${LIBAOM_TEST_DATA_PATH}/vp80-00-comprehensive-001.ivf"
AV1_IVF_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-09-subpixel-00.ivf" AV1_IVF_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-09-subpixel-00.ivf"
AV1_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm" AV1_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-00-quantizer-00.webm"
AV1_FPM_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-07-frame_parallel-1.webm" AV1_FPM_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-07-frame_parallel-1.webm"
AV1_LT_50_FRAMES_WEBM_FILE="${LIBVPX_TEST_DATA_PATH}/vp90-2-02-size-32x08.webm" AV1_LT_50_FRAMES_WEBM_FILE="${LIBAOM_TEST_DATA_PATH}/vp90-2-02-size-32x08.webm"
YUV_RAW_INPUT="${LIBVPX_TEST_DATA_PATH}/hantro_collage_w352h288.yuv" YUV_RAW_INPUT="${LIBAOM_TEST_DATA_PATH}/hantro_collage_w352h288.yuv"
YUV_RAW_INPUT_WIDTH=352 YUV_RAW_INPUT_WIDTH=352
YUV_RAW_INPUT_HEIGHT=288 YUV_RAW_INPUT_HEIGHT=288
Y4M_NOSQ_PAR_INPUT="${LIBVPX_TEST_DATA_PATH}/park_joy_90p_8_420_a10-1.y4m" Y4M_NOSQ_PAR_INPUT="${LIBAOM_TEST_DATA_PATH}/park_joy_90p_8_420_a10-1.y4m"
Y4M_720P_INPUT="${LIBVPX_TEST_DATA_PATH}/niklas_1280_720_30.y4m" Y4M_720P_INPUT="${LIBAOM_TEST_DATA_PATH}/niklas_1280_720_30.y4m"
# Setup a trap function to clean up after tests complete. # Setup a trap function to clean up after tests complete.
trap cleanup EXIT trap cleanup EXIT
...@@ -433,7 +433,7 @@ trap cleanup EXIT ...@@ -433,7 +433,7 @@ trap cleanup EXIT
vlog "$(basename "${0%.*}") test configuration: vlog "$(basename "${0%.*}") test configuration:
LIBAOM_BIN_PATH=${LIBAOM_BIN_PATH} LIBAOM_BIN_PATH=${LIBAOM_BIN_PATH}
LIBAOM_CONFIG_PATH=${LIBAOM_CONFIG_PATH} LIBAOM_CONFIG_PATH=${LIBAOM_CONFIG_PATH}
LIBVPX_TEST_DATA_PATH=${LIBVPX_TEST_DATA_PATH} LIBAOM_TEST_DATA_PATH=${LIBAOM_TEST_DATA_PATH}
AOM_IVF_FILE=${AOM_IVF_FILE} AOM_IVF_FILE=${AOM_IVF_FILE}
AV1_IVF_FILE=${AV1_IVF_FILE} AV1_IVF_FILE=${AV1_IVF_FILE}
AV1_WEBM_FILE=${AV1_WEBM_FILE} AV1_WEBM_FILE=${AV1_WEBM_FILE}
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# Environment check: $YUV_RAW_INPUT is required. # Environment check: $YUV_RAW_INPUT is required.
twopass_encoder_verify_environment() { twopass_encoder_verify_environment() {
if [ ! -e "${YUV_RAW_INPUT}" ]; then if [ ! -e "${YUV_RAW_INPUT}" ]; then
echo "Libaom test data must exist in LIBVPX_TEST_DATA_PATH." echo "Libaom test data must exist in LIBAOM_TEST_DATA_PATH."
return 1 return 1
fi fi
} }
......
...@@ -25,22 +25,22 @@ ...@@ -25,22 +25,22 @@
namespace libaom_test { namespace libaom_test {
// Helper macros to ensure LIBVPX_TEST_DATA_PATH is a quoted string. // Helper macros to ensure LIBAOM_TEST_DATA_PATH is a quoted string.
// These are undefined right below GetDataPath // These are undefined right below GetDataPath
// NOTE: LIBVPX_TEST_DATA_PATH MUST NOT be a quoted string before // NOTE: LIBAOM_TEST_DATA_PATH MUST NOT be a quoted string before
// Stringification or the GetDataPath will fail at runtime // Stringification or the GetDataPath will fail at runtime
#define TO_STRING(S) #S #define TO_STRING(S) #S
#define STRINGIFY(S) TO_STRING(S) #define STRINGIFY(S) TO_STRING(S)
// A simple function to encapsulate cross platform retrieval of test data path // A simple function to encapsulate cross platform retrieval of test data path
static std::string GetDataPath() { static std::string GetDataPath() {
const char *const data_path = getenv("LIBVPX_TEST_DATA_PATH"); const char *const data_path = getenv("LIBAOM_TEST_DATA_PATH");
if (data_path == NULL) { if (data_path == NULL) {
#ifdef LIBVPX_TEST_DATA_PATH #ifdef LIBAOM_TEST_DATA_PATH
// In some environments, we cannot set environment variables // In some environments, we cannot set environment variables
// Instead, we set the data path by using a preprocessor symbol // Instead, we set the data path by using a preprocessor symbol
// which can be set from make files // which can be set from make files
return STRINGIFY(LIBVPX_TEST_DATA_PATH); return STRINGIFY(LIBAOM_TEST_DATA_PATH);
#else #else
return "."; return ".";
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment