if (is_linux) {
sources += [
- "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp",
- "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp",
+ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp",
+ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp",
]
libs += [
"GL",
]
} else if (is_mac) {
sources += [
- "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp",
- "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp",
+ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp",
+ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp",
]
libs += [ "OpenGL.framework" ]
}
rebase_path("tests/FontMgrAndroidParserTest.cpp"), # Android only
rebase_path("tests/PathOpsSkpClipTest.cpp"), # alternate main
rebase_path("tests/RTConfRegistryTest.cpp"), # TODO: delete
- rebase_path("tests/SkSLErrorTest.cpp"), # TODO: make work
- rebase_path("tests/SkSLGLSLTest.cpp"), # TODO: make work
+ rebase_path("tests/SkSLErrorTest.cpp"), # TODO: make work
+ rebase_path("tests/SkSLGLSLTest.cpp"), # TODO: make work
rebase_path("tests/SkpSkGrTest.cpp"), # doesn't compile
rebase_path("tests/skia_test.cpp"), # alternate main
]
'`%s` failed:\n%s' % (' '.join(cmd), e.output)))
return results
+def _CheckGNFormatted(input_api, output_api):
+ """Make sure any .gn files we're changing have been formatted."""
+ results = []
+ for f in input_api.AffectedFiles():
+ if not f.LocalPath().endswith('.gn'):
+ continue
+
+ cmd = ['gn', 'format', '--dry-run', f.LocalPath()]
+ try:
+ subprocess.check_output(cmd)
+ except subprocess.CalledProcessError:
+ fix = cmd[:]
+ fix[2] = '--in-place'
+ results.append(output_api.PresubmitError(
+ '`%s` failed, try\n\t%s' % (' '.join(cmd), ' '.join(fix))))
+ return results
+
def _CommonChecks(input_api, output_api):
"""Presubmit checks common to upload and commit."""
# Run on upload, not commit, since the presubmit bot apparently doesn't have
# coverage installed.
results.extend(_RecipeSimulationTest(input_api, output_api))
+ results.extend(_CheckGNFormatted(input_api, output_api))
return results