From 9d660a0f3bea833d74e9e8231d47baf996cce0e3 Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Thu, 18 Apr 2024 12:50:28 -0700 Subject: [PATCH] Fix environment variable LIBYUV_CPU_INFO for unittests - Also bump version number Bug: libyuv:979 Change-Id: I2903f15f9b9f3cd1b556eba95b01c4c58d1733b7 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5466641 Reviewed-by: James Zern --- README.chromium | 2 +- include/libyuv/version.h | 2 +- unit_test/unit_test.cc | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.chromium b/README.chromium index 6d13097db..4c281834f 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: https://chromium.googlesource.com/libyuv/libyuv/ -Version: 1887 +Version: 1888 License: BSD License File: LICENSE Shipped: yes diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 30e6d1255..d3099004a 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1887 +#define LIBYUV_VERSION 1888 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/unit_test/unit_test.cc b/unit_test/unit_test.cc index c351d5e25..4abd655f4 100644 --- a/unit_test/unit_test.cc +++ b/unit_test/unit_test.cc @@ -207,7 +207,7 @@ LibYUVConvertTest::LibYUVConvertTest() } const char* cpu_info = getenv("LIBYUV_CPU_INFO"); if (cpu_info) { - benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + benchmark_cpu_info_ = atoi(cpu_info); // NOLINT } if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); @@ -263,7 +263,7 @@ LibYUVColorTest::LibYUVColorTest() } const char* cpu_info = getenv("LIBYUV_CPU_INFO"); if (cpu_info) { - benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + benchmark_cpu_info_ = atoi(cpu_info); // NOLINT } if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); @@ -319,7 +319,7 @@ LibYUVScaleTest::LibYUVScaleTest() } const char* cpu_info = getenv("LIBYUV_CPU_INFO"); if (cpu_info) { - benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + benchmark_cpu_info_ = atoi(cpu_info); // NOLINT } if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); @@ -375,7 +375,7 @@ LibYUVRotateTest::LibYUVRotateTest() } const char* cpu_info = getenv("LIBYUV_CPU_INFO"); if (cpu_info) { - benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + benchmark_cpu_info_ = atoi(cpu_info); // NOLINT } if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); @@ -431,7 +431,7 @@ LibYUVPlanarTest::LibYUVPlanarTest() } const char* cpu_info = getenv("LIBYUV_CPU_INFO"); if (cpu_info) { - benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + benchmark_cpu_info_ = atoi(cpu_info); // NOLINT } if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); @@ -487,7 +487,7 @@ LibYUVBaseTest::LibYUVBaseTest() } const char* cpu_info = getenv("LIBYUV_CPU_INFO"); if (cpu_info) { - benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + benchmark_cpu_info_ = atoi(cpu_info); // NOLINT } if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info); @@ -543,7 +543,7 @@ LibYUVCompareTest::LibYUVCompareTest() } const char* cpu_info = getenv("LIBYUV_CPU_INFO"); if (cpu_info) { - benchmark_cpu_info_ = atoi(cpu_flags); // NOLINT + benchmark_cpu_info_ = atoi(cpu_info); // NOLINT } if (LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info)) { benchmark_cpu_info_ = LIBYUV_GET_FLAG(FLAGS_libyuv_cpu_info);