from gpu_tests import context_lost_integration_test from gpu_tests import gpu_helper from gpu_tests import gpu_integration_test from gpu_tests import path_util from gpu_tests import webgl_conformance_integration_test from py_utils import tempfile_ext from telemetry.internal.util import binary_manager from telemetry.internal.platform import system_info from telemetry.testing import browser_test_runner from telemetry.testing import fakes from telemetry.testing import run_browser_tests path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'tools', 'perf') from chrome_telemetry_build import chromium_config # Unittest test cases are defined as public methods, so ignore complaints about # having too many. # pylint: disable=too-many-public-methods VENDOR_NVIDIA = 0x10DE VENDOR_AMD = 0x1002 VENDOR_INTEL = 0x8086 VENDOR_STRING_IMAGINATION = 'Imagination Technologies' DEVICE_STRING_SGX = 'PowerVR SGX 554' def _GetSystemInfo( # pylint: disable=too-many-arguments
#pylint: disable=protected-access import os import tempfile import unittest import mock from gpu_tests import path_util from gpu_tests.skia_gold import gpu_skia_gold_properties from gpu_tests.skia_gold import gpu_skia_gold_session from pyfakefs import fake_filesystem_unittest path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'build') from skia_gold_common import unittest_utils createSkiaGoldArgs = unittest_utils.createSkiaGoldArgs def assertArgWith(test, arg_list, arg, value): i = arg_list.index(arg) test.assertEqual(arg_list[i + 1], value) class GpuSkiaGoldSessionDiffTest(fake_filesystem_unittest.TestCase): def setUp(self): self.setUpPyfakefs() self._working_dir = tempfile.mkdtemp() self._json_keys = tempfile.NamedTemporaryFile(delete=False).name
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script runs unit tests of the code in the gpu_tests/ directory. This script DOES NOT run tests. run_gpu_test does that. """ import sys from gpu_tests import path_util import gpu_project_config path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'tools', 'telemetry') from telemetry.testing import unittest_runner def main(): return unittest_runner.Run(gpu_project_config.CONFIG, no_browser=True) if __name__ == '__main__': sys.exit(main())
# Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GPU implementation of //testing/skia_gold_common/skia_gold_session.py.""" import os import subprocess import tempfile from gpu_tests import path_util path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'testing') from skia_gold_common import skia_gold_session class GpuSkiaGoldSession(skia_gold_session.SkiaGoldSession): def RunComparison(self, name, png_file, output_manager=True, use_luci=True): # Passing True for the output manager is a bit of a hack, as we don't # actually need an output manager and just need to get past the truthy # check. return super(GpuSkiaGoldSession, self).RunComparison(name=name, png_file=png_file, output_manager=output_manager, use_luci=use_luci) def _CreateDiffOutputDir(self): # We intentionally don't clean this up and don't put it in self._working_dir
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest import os from gpu_tests import path_util path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'third_party', 'logilab') path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'third_party', 'logilab', 'logilab') path_util.AddDirToPathIfNeeded(path_util.GetChromiumSrcDir(), 'third_party', 'pylint') try: from pylint import lint except ImportError: lint = None _RC_FILE = os.path.join(path_util.GetGpuTestDir(), 'pylintrc') def LintCheckPassed(directory): args = [directory, '--rcfile=%s' % _RC_FILE] try: assert lint, 'pylint module cannot be found' lint.Run(args)