diff options
author | tfarina <tfarina@chromium.org> | 2015-03-31 12:00:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-31 19:01:18 +0000 |
commit | 719f00367465a6b940dc2804be147a0b23546cf4 (patch) | |
tree | 5da8f513bf79828f2eb3326271e33cc55fa259a6 | |
parent | 3ff6a4012d73a1dbc0e8f04e69fb07bda3176273 (diff) | |
download | chromium_src-719f00367465a6b940dc2804be147a0b23546cf4.zip chromium_src-719f00367465a6b940dc2804be147a0b23546cf4.tar.gz chromium_src-719f00367465a6b940dc2804be147a0b23546cf4.tar.bz2 |
Port gles2_conform_test_windowless action to GN build.
It requires internal test files, hence it was not tested.
Partially tested on Linux with the following command lines:
$ gn gen out-gn --args='internal_gles2_conform_tests'
Formatted with the following command line:
$ gn format --in-place gpu/gles2_conform_support/BUILD.gn
BUG=432959
TEST=see above
R=dpranke@chromium.org,sievers@chromium.org
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Review URL: https://codereview.chromium.org/1033373002
Cr-Commit-Position: refs/heads/master@{#323082}
-rw-r--r-- | build/config/linux/gtk/BUILD.gn | 1 | ||||
-rw-r--r-- | gpu/gles2_conform_support/BUILD.gn | 105 |
2 files changed, 105 insertions, 1 deletions
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn index 7130e15..0862655 100644 --- a/build/config/linux/gtk/BUILD.gn +++ b/build/config/linux/gtk/BUILD.gn @@ -26,6 +26,7 @@ pkg_config("gtk_internal_config") { group("gtk") { visibility = [ "//chrome/browser/ui/libgtk2ui", + "//gpu/gles2_conform_support:gles2_conform_test_windowless", "//remoting/host", ] public_configs = [ ":gtk_internal_config" ] diff --git a/gpu/gles2_conform_support/BUILD.gn b/gpu/gles2_conform_support/BUILD.gn index 66d0d8e..c91ecb3 100644 --- a/gpu/gles2_conform_support/BUILD.gn +++ b/gpu/gles2_conform_support/BUILD.gn @@ -39,7 +39,7 @@ executable("gles2_conform_support") { } if (internal_gles2_conform_tests) { - action("generate_gles2_conform_embedded_files") { + action("generate_gles2_conform_embedded_data") { script = "generate_gles2_embedded_data.py" output = [ "$target_gen_dir/gles2_conform_test_embedded_data/FilesData.c", @@ -51,6 +51,106 @@ if (internal_gles2_conform_tests) { "$target_gen_dir/gles2_conform_test_embedded_data", ] } + gles2_conform_gypi = exec_script("//build/gypi_to_gn.py", + [ rebase_path("gles2_conform_gypi") ], + "scoped", + [ "gles2_conform_gypi" ]) + executable("gles2_conform_test_windowless") { + testonly = true + sources = [ + # Include a dummy c++ file to force linking of libstdc++. + "dummy.cc", + gles2_conform_gypi.gtf_es_sources, + ] + defines = [ + "GTF_API=GTF_GLES20", + "HKEMBEDDEDFILESYSTEM", + ] + deps = [ + ":generate_gles2_conform_embedded_data", + "//gpu/gles2_conform_support/egl", + "//gpu/gles2_conform_support/native:windowless", + "//gpu/command_buffer/client:gles2_c_libnocheck", + ] + if (is_linux) { + if (!is_chromeos) { + deps += [ "//build/linux/system/gtk" ] + + if (is_clang) { + cflags = [ + "-Wno-array-bounds", + "-Wno-implicit-function-declaration", + "-Wno-incompatible-pointer-types", + "-Wno-parentheses-equality", + "-Wno-pointer-sign", + "-Wno-return-type", + "-Wno-sizeof-pointer-memaccess", + "-Wno-tautological-compare", + ] + } + } + } + if (is_win) { + deps += [ + "//third_party/angle:libEGL", + "//third_party/angle:libGLESv2", + ] + defines = [ + "EGLAPI=", + "EGLAPIENTRY=", + ] + defines -= [ "NOMINMAX" ] + cflags = [ + "/wd4018", # signed/unsigned mismatch + "/wd4101", # unreferenced local variable + "/wd4715", # not all control paths return a value + "/wd4267", # size_t/unsigned int conversion + ] + } + if (is_mac) { + defines = [ + "_STDINT", + "_STDINT_H", + ] + if (is_clang) { + cflags = [ + "-Wno-pointer-sign", + "-Wno-array-bounds", + "-Wno-sizeof-pointer-memaccess", + "-Wno-implicit-function-declaration", + "-Wno-logical-op-parentheses", + "-Wno-tautological-compare", + "-Wno-parentheses-equality", + "-Wno-return-type", + ] + #"xcode_settings": { + #"LD": "clang++", + #"WARNING_CFLAGS": [ + #"-Wno-pointer-sign", + #"-Wno-array-bounds", + #"-Wno-sizeof-pointer-memaccess", + #"-Wno-implicit-function-declaration", + #"-Wno-logical-op-parentheses", + #"-Wno-tautological-compare", + #"-Wno-parentheses-equality", + #"-Wno-return-type", + #], + #}, + } + } + + #'run_as': { + # 'conditions': [ + # ['OS=="win"', { + # 'action': [ + # '$(TargetPath)', + # '-noimagefileio', + # '-run=<(DEPTH)/third_party/gles2_conform/GTF_ES/glsl/GTF/mustpass.run', + # ], + # }], + # ], + # }, + } } test("gles2_conform_test") { @@ -62,4 +162,7 @@ test("gles2_conform_test") { "//gpu/config", "//testing/gtest", ] + if (internal_gles2_conform_tests) { + deps += [ "gles2_conform_test_windowless" ] + } } |