зеркало из https://github.com/AvaloniaUI/angle.git
Rename util/system_utils to util/test_utils.
This removes a GN naming conflict between util/system_utils and common/system_utils. This conflict was preventing us from adding unit tests to utils' version of system_utils. Since these functions are only useful to tests and samples rename them test_utils for simplicity. Will enable further development of ANGLE's standalone testing harness. Bug: angleproject:3162 Change-Id: I9e34fb69f96c5de6dc2453fce4148a0f285e15ed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1825268 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
d627d15463
Коммит
57b37b6b79
|
@ -10,7 +10,7 @@
|
|||
#include <iostream>
|
||||
|
||||
#include "util/OSWindow.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include "SampleApplication.h"
|
||||
#include "texture_utils.h"
|
||||
#include "util/shader_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include <GLES/gl.h>
|
||||
#include <GLES/glext.h>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "tga_utils.h"
|
||||
#include "util/shader_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
class MultiTextureSample : public SampleApplication
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "texture_utils.h"
|
||||
#include "util/shader_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
|
|
|
@ -19,11 +19,12 @@
|
|||
#include "tga_utils.h"
|
||||
#include "util/random_utils.h"
|
||||
#include "util/shader_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
using namespace angle;
|
||||
|
||||
class ParticleSystemSample : public SampleApplication
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include "util/EGLWindow.h"
|
||||
#include "util/gles_loader_autogen.h"
|
||||
#include "util/random_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "common/system_utils.h"
|
||||
#include "util/EGLPlatformParameters.h"
|
||||
#include "util/OSWindow.h"
|
||||
#include "util/Timer.h"
|
||||
|
|
|
@ -19,10 +19,11 @@
|
|||
#include "common/debug.h"
|
||||
#include "common/platform.h"
|
||||
#include "common/string_utils.h"
|
||||
#include "common/system_utils.h"
|
||||
#include "platform/Platform.h"
|
||||
#include "tests/test_expectations/GPUTestConfig.h"
|
||||
#include "tests/test_expectations/GPUTestExpectationsParser.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "angle_deqp_libtester.h"
|
||||
#include "common/angleutils.h"
|
||||
#include "common/system_utils.h"
|
||||
#include "deMath.h"
|
||||
#include "deUniquePtr.hpp"
|
||||
#include "platform/Platform.h"
|
||||
|
@ -20,7 +21,6 @@
|
|||
#include "tcuRandomOrderExecutor.h"
|
||||
#include "tcuResource.hpp"
|
||||
#include "tcuTestLog.hpp"
|
||||
#include "util/system_utils.h"
|
||||
|
||||
tcu::Platform *CreateANGLEPlatform(angle::LogErrorFunc logErrorFunc);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "egluGLContextFactory.hpp"
|
||||
#include "tcuANGLENativeDisplayFactory.h"
|
||||
#include "tcuNullContextFactory.hpp"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
static_assert(EGL_DONT_CARE == -1, "Unexpected value for EGL_DONT_CARE");
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "libANGLE/renderer/d3d/d3d11/converged/CompositorNativeWindow11.h"
|
||||
#include "util/OSWindow.h"
|
||||
#include "util/com_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
using namespace angle;
|
||||
using namespace ABI::Windows::System;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// IndexBufferOffsetTest.cpp: Test glDrawElements with an offset and an index buffer
|
||||
|
||||
#include "test_utils/ANGLETest.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
using namespace angle;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "test_utils/ANGLETest.h"
|
||||
#include "util/EGLWindow.h"
|
||||
#include "util/random_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
using namespace angle;
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "test_utils/gl_raii.h"
|
||||
|
||||
#include "util/random_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
using namespace angle;
|
||||
|
||||
|
@ -157,7 +158,7 @@ class ParallelShaderCompileTest : public ANGLETest
|
|||
}
|
||||
++i;
|
||||
}
|
||||
Sleep(kPollInterval);
|
||||
angle::Sleep(kPollInterval);
|
||||
}
|
||||
|
||||
while (!linkTasks.empty())
|
||||
|
@ -174,7 +175,7 @@ class ParallelShaderCompileTest : public ANGLETest
|
|||
}
|
||||
++i;
|
||||
}
|
||||
Sleep(kPollInterval);
|
||||
angle::Sleep(kPollInterval);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "test_utils/ANGLETest.h"
|
||||
#include "util/EGLWindow.h"
|
||||
#include "util/random_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
using namespace angle;
|
||||
|
||||
|
|
|
@ -11,10 +11,11 @@
|
|||
|
||||
#include "ANGLEPerfTestArgs.h"
|
||||
#include "common/platform.h"
|
||||
#include "common/system_utils.h"
|
||||
#include "third_party/perf/perf_test.h"
|
||||
#include "third_party/trace_event/trace_event.h"
|
||||
#include "util/shader_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
#include "ANGLEPerfTest.h"
|
||||
#include "common/platform.h"
|
||||
#include "common/system_utils.h"
|
||||
#include "platform/Platform.h"
|
||||
#include "test_utils/angle_test_configs.h"
|
||||
#include "test_utils/angle_test_instantiate.h"
|
||||
#include "util/system_utils.h"
|
||||
|
||||
#define ITERATIONS 20
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "common/system_utils.h"
|
||||
#include "test_utils/angle_test_configs.h"
|
||||
#include "test_utils/angle_test_instantiate.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
using namespace angle;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "gpu_info_util/SystemInfo.h"
|
||||
#include "util/EGLWindow.h"
|
||||
#include "util/OSWindow.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#if defined(ANGLE_PLATFORM_WINDOWS)
|
||||
# include <VersionHelpers.h>
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
#include "angle_test_configs.h"
|
||||
#include "common/angleutils.h"
|
||||
#include "common/system_utils.h"
|
||||
#include "common/vector_utils.h"
|
||||
#include "platform/Platform.h"
|
||||
#include "util/EGLWindow.h"
|
||||
#include "util/shader_utils.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/util_gl.h"
|
||||
|
||||
namespace angle
|
||||
|
|
|
@ -14,11 +14,12 @@
|
|||
|
||||
#include "angle_gl.h"
|
||||
#include "common/platform.h"
|
||||
#include "common/system_utils.h"
|
||||
#include "gpu_info_util/SystemInfo.h"
|
||||
#include "test_utils/angle_test_configs.h"
|
||||
#include "util/EGLWindow.h"
|
||||
#include "util/OSWindow.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#if defined(ANGLE_PLATFORM_WINDOWS)
|
||||
# include <VersionHelpers.h>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include "common/system_utils.h"
|
||||
#include "platform/Platform.h"
|
||||
#include "util/OSWindow.h"
|
||||
#include "util/system_utils.h"
|
||||
|
||||
// ConfigParameters implementation.
|
||||
ConfigParameters::ConfigParameters()
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// system_utils_crash_handler:
|
||||
// crash_handler_posix:
|
||||
// ANGLE's crash handling and stack walking code. Modified from Skia's:
|
||||
// https://github.com/google/skia/blob/master/tools/CrashHandler.cpp
|
||||
//
|
||||
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include "common/angleutils.h"
|
||||
|
|
@ -4,24 +4,28 @@
|
|||
// found in the LICENSE file.
|
||||
//
|
||||
|
||||
// Posix_system_utils.cpp: Implementation of OS-specific functions for Posix systems
|
||||
// test_utils_posix.cpp: Implementation of OS-specific functions for Posix systems
|
||||
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdarg>
|
||||
|
||||
#include "common/platform.h"
|
||||
|
||||
#if !defined(ANGLE_PLATFORM_FUCHSIA)
|
||||
# include <dlfcn.h>
|
||||
# include <sys/resource.h>
|
||||
# include <sys/stat.h>
|
||||
# include <sys/types.h>
|
||||
# include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#include "common/platform.h"
|
||||
|
||||
namespace angle
|
||||
{
|
||||
|
||||
void Sleep(unsigned int milliseconds)
|
||||
{
|
||||
// On Windows Sleep(0) yields while it isn't guaranteed by Posix's sleep
|
|
@ -4,14 +4,14 @@
|
|||
// found in the LICENSE file.
|
||||
//
|
||||
|
||||
// system_utils.h: declaration of OS-specific utility functions
|
||||
// test_utils.h: declaration of OS-specific utility functions
|
||||
|
||||
#ifndef UTIL_SYSTEM_UTILS_H_
|
||||
#define UTIL_SYSTEM_UTILS_H_
|
||||
#ifndef UTIL_TEST_UTILS_H_
|
||||
#define UTIL_TEST_UTILS_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "common/system_utils.h"
|
||||
#include "util/util_export.h"
|
||||
|
||||
namespace angle
|
||||
|
@ -33,6 +33,7 @@ ANGLE_UTIL_EXPORT void TerminateCrashHandler();
|
|||
|
||||
// Print a stack back trace.
|
||||
ANGLE_UTIL_EXPORT void PrintStackBacktrace();
|
||||
|
||||
} // namespace angle
|
||||
|
||||
#endif // UTIL_SYSTEM_UTILS_H_
|
||||
#endif // UTIL_TEST_UTILS_H_
|
|
@ -12,7 +12,7 @@ util_sources = [
|
|||
"util/random_utils.h",
|
||||
"util/shader_utils.cpp",
|
||||
"util/shader_utils.h",
|
||||
"util/system_utils.h",
|
||||
"util/test_utils.h",
|
||||
"util/util_export.h",
|
||||
"util/util_gl.h",
|
||||
"util/Event.h",
|
||||
|
@ -28,12 +28,12 @@ util_sources = [
|
|||
]
|
||||
|
||||
util_win_sources = [
|
||||
"util/windows/win32/Win32_system_utils.cpp",
|
||||
"util/windows/test_utils_win.cpp",
|
||||
"util/windows/win32/test_utils_win32.cpp",
|
||||
"util/windows/win32/Win32Pixmap.cpp",
|
||||
"util/windows/win32/Win32Pixmap.h",
|
||||
"util/windows/win32/Win32Window.cpp",
|
||||
"util/windows/win32/Win32Window.h",
|
||||
"util/windows/Windows_system_utils.cpp",
|
||||
"util/windows/WGLWindow.h",
|
||||
]
|
||||
|
||||
|
@ -42,8 +42,8 @@ if (current_os != "winuwp") {
|
|||
}
|
||||
|
||||
util_posix_sources = [
|
||||
"util/posix/Posix_crash_handler.cpp",
|
||||
"util/posix/Posix_system_utils.cpp",
|
||||
"util/posix/crash_handler_posix.cpp",
|
||||
"util/posix/test_utils_posix.cpp",
|
||||
]
|
||||
|
||||
util_linux_sources = util_posix_sources
|
||||
|
@ -66,14 +66,12 @@ util_ozone_sources = [
|
|||
"util/ozone/OzoneWindow.h",
|
||||
]
|
||||
|
||||
util_osx_sources = [
|
||||
"util/osx/OSXPixmap.mm",
|
||||
"util/osx/OSXPixmap.h",
|
||||
"util/osx/OSXWindow.mm",
|
||||
"util/osx/OSXWindow.h",
|
||||
"util/posix/Posix_crash_handler.cpp",
|
||||
"util/posix/Posix_system_utils.cpp",
|
||||
]
|
||||
util_osx_sources = util_posix_sources + [
|
||||
"util/osx/OSXPixmap.mm",
|
||||
"util/osx/OSXPixmap.h",
|
||||
"util/osx/OSXWindow.mm",
|
||||
"util/osx/OSXWindow.h",
|
||||
]
|
||||
|
||||
util_android_sources = util_posix_sources + [
|
||||
"util/android/AndroidPixmap.cpp",
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "util/windows/WGLWindow.h"
|
||||
|
||||
#include "common/string_utils.h"
|
||||
#include "common/system_utils.h"
|
||||
#include "util/OSWindow.h"
|
||||
#include "util/system_utils.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
// found in the LICENSE file.
|
||||
//
|
||||
|
||||
// Windows_system_utils.cpp: Implementation of OS-specific functions for Windows
|
||||
// test_utils_win.cpp: Implementation of OS-specific functions for Windows
|
||||
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <windows.h>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
#include "common/angleutils.h"
|
||||
#include "util/windows/third_party/StackWalker/src/StackWalker.h"
|
||||
|
||||
namespace angle
|
||||
|
@ -144,5 +144,4 @@ void PrintStackBacktrace()
|
|||
RtlCaptureContext(&context);
|
||||
PrintBacktrace(&context);
|
||||
}
|
||||
|
||||
} // namespace angle
|
|
@ -4,9 +4,9 @@
|
|||
// found in the LICENSE file.
|
||||
//
|
||||
|
||||
// Win32_system_utils.cpp: Implementation of OS-specific functions for Win32 (Windows)
|
||||
// test_utils_win32.cpp: Implementation of OS-specific functions for Win32 (Windows)
|
||||
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <array>
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include "common/debug.h"
|
||||
#include "util/Timer.h"
|
||||
#include "util/system_utils.h"
|
||||
#include "util/test_utils.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче