2 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
3 # vim: set filetype=python:
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 def gen_includes(export_prefix
, path_prefix
):
16 for f
in os
.listdir(path_prefix
):
17 # Explicitly ignore the "{gtest,gmock}/internal/custom" paths, as we
18 # replace files in them for custom configurations.
22 path
= os
.path
.join(path_prefix
, f
)
23 if os
.path
.isfile(path
):
24 if os
.path
.splitext(f
)[1] != ".h":
28 result
+= gen_includes(export_prefix
+ "." + f
, path
)
31 result
+= "%s += [\n" % export_prefix
32 for export
in sorted(exports
):
33 result
+= " %s,\n" % json
.dumps(export
)
39 if __name__
== "__main__":
40 GTEST_PATH
= "googletest/include/gtest"
41 GMOCK_PATH
= "googlemock/include/gmock"
45 # Normal include paths used by most code
46 gen_includes("EXPORTS.gtest", GTEST_PATH
),
47 gen_includes("EXPORTS.gmock", GMOCK_PATH
),
48 # webrtc.org unit tests use this include path
49 gen_includes("EXPORTS.testing.gtest.include.gtest", GTEST_PATH
),
50 gen_includes("EXPORTS.testing.gmock.include.gmock", GMOCK_PATH
),
53 exports
= exports
.replace("\n", "\n ")
56 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
57 # vim: set filetype=python:
58 # This Source Code Form is subject to the terms of the Mozilla Public
59 # License, v. 2.0. If a copy of the MPL was not distributed with this
60 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
62 # !!! THIS FILE IS AUTOGENERATED USING gen_moz_build.py DO NOT EDIT !!!
65 BUG_COMPONENT = ("Testing", "GTest")
66 SCHEDULES.exclusive = ["gtest"]
68 if CONFIG["ENABLE_TESTS"]:
73 "googlemock/src/gmock-all.cc",
74 "googletest/src/gtest-all.cc",
84 if CONFIG["OS_ARCH"] == "WINNT":
85 DEFINES["UNICODE"] = True
87 FINAL_LIBRARY = "xul-gtest"
90 with
open("moz.build", "w") as f
: