Reviewers: rossberg,
Description:
Extend GCMole to also cover cctest files.
[email protected]
Please review this at https://codereview.chromium.org/240933002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+20, -13 lines):
M test/cctest/cctest.gyp
M tools/gcmole/gcmole.lua
Index: test/cctest/cctest.gyp
diff --git a/test/cctest/cctest.gyp b/test/cctest/cctest.gyp
index
eba0580ca58ce31c91c588707f217359e5698dda..745b4c51d886b18fed569fe2c9ef52ee3816436c
100644
--- a/test/cctest/cctest.gyp
+++ b/test/cctest/cctest.gyp
@@ -41,7 +41,7 @@
'include_dirs': [
'../../src',
],
- 'sources': [
+ 'sources': [ ### gcmole(all) ###
'<(generated_file)',
'cctest.cc',
'gay-fixed.cc',
@@ -125,7 +125,7 @@
],
'conditions': [
['v8_target_arch=="ia32"', {
- 'sources': [
+ 'sources': [ ### gcmole(arch:ia32) ###
'test-assembler-ia32.cc',
'test-code-stubs.cc',
'test-code-stubs-ia32.cc',
@@ -136,7 +136,7 @@
],
}],
['v8_target_arch=="x64"', {
- 'sources': [
+ 'sources': [ ### gcmole(arch:x64) ###
'test-assembler-x64.cc',
'test-code-stubs.cc',
'test-code-stubs-x64.cc',
@@ -147,7 +147,7 @@
],
}],
['v8_target_arch=="arm"', {
- 'sources': [
+ 'sources': [ ### gcmole(arch:arm) ###
'test-assembler-arm.cc',
'test-code-stubs.cc',
'test-code-stubs-arm.cc',
@@ -156,7 +156,7 @@
],
}],
['v8_target_arch=="arm64"', {
- 'sources': [
+ 'sources': [ ### gcmole(arch:arm64) ###
'test-utils-arm64.cc',
'test-assembler-arm64.cc',
'test-code-stubs.cc',
@@ -168,7 +168,7 @@
],
}],
['v8_target_arch=="mipsel"', {
- 'sources': [
+ 'sources': [ ### gcmole(arch:mipsel) ###
'test-assembler-mips.cc',
'test-code-stubs.cc',
'test-code-stubs-mips.cc',
Index: tools/gcmole/gcmole.lua
diff --git a/tools/gcmole/gcmole.lua b/tools/gcmole/gcmole.lua
index
cd91a913d31b243e8484f5d89e204a002c90bb9e..f1980a459611717744061c6d94b4f1592c4a7306
100644
--- a/tools/gcmole/gcmole.lua
+++ b/tools/gcmole/gcmole.lua
@@ -116,7 +116,7 @@ function InvokeClangPluginForEachFile(filenames, cfg,
func)
cfg.arch_define)
for _, filename in ipairs(filenames) do
log("-- %s", filename)
- local action = cmd_line .. " src/" .. filename .. " 2>&1"
+ local action = cmd_line .. " " .. filename .. " 2>&1"
if FLAGS.verbose then print('popen ', action) end
local pipe = io.popen(action)
func(filename, pipe:lines())
@@ -129,19 +129,26 @@ end
-- GYP file parsing
local function ParseGYPFile()
- local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file")
- local gyp = f:read('*a')
- f:close()
+ local gyp = ""
+ local gyp_files = { "tools/gyp/v8.gyp", "test/cctest/cctest.gyp" }
+ for i = 1, #gyp_files do
+ local f = assert(io.open(gyp_files[i]), "failed to open GYP file")
+ local t = f:read('*a')
+ gyp = gyp .. t
+ f:close()
+ end
local result = {}
for condition, sources in
gyp:gmatch "'sources': %[.-### gcmole%((.-)%) ###(.-)%]" do
- local files = {}
+ if result[condition] == nil then result[condition] = {} end
for file in sources:gmatch "'%.%./%.%./src/([^']-%.cc)'" do
- table.insert(files, file)
+ table.insert(result[condition], "src/" .. file)
+ end
+ for file in sources:gmatch "'(test-[^']-%.cc)'" do
+ table.insert(result[condition], "test/cctest/" .. file)
end
- result[condition] = files
end
return result
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.