Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: tools/gcmole/gcmole.lua

Issue 2098313002: [gn] Use one source of truth for test source files. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/unittests/unittests.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 -- Copyright 2011 the V8 project authors. All rights reserved. 1 -- Copyright 2011 the V8 project authors. All rights reserved.
2 -- Redistribution and use in source and binary forms, with or without 2 -- Redistribution and use in source and binary forms, with or without
3 -- modification, are permitted provided that the following conditions are 3 -- modification, are permitted provided that the following conditions are
4 -- met: 4 -- met:
5 -- 5 --
6 -- * Redistributions of source code must retain the above copyright 6 -- * Redistributions of source code must retain the above copyright
7 -- notice, this list of conditions and the following disclaimer. 7 -- notice, this list of conditions and the following disclaimer.
8 -- * Redistributions in binary form must reproduce the above 8 -- * Redistributions in binary form must reproduce the above
9 -- copyright notice, this list of conditions and the following 9 -- copyright notice, this list of conditions and the following
10 -- disclaimer in the documentation and/or other materials provided 10 -- disclaimer in the documentation and/or other materials provided
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 { "test/cctest/cctest.gyp", "'(test-[^']-%.cc)'", "test/cctest/" } 190 { "test/cctest/cctest.gyp", "'(test-[^']-%.cc)'", "test/cctest/" }
191 } 191 }
192 192
193 for i = 1, #gyp_files do 193 for i = 1, #gyp_files do
194 local filename = gyp_files[i][1] 194 local filename = gyp_files[i][1]
195 local pattern = gyp_files[i][2] 195 local pattern = gyp_files[i][2]
196 local prefix = gyp_files[i][3] 196 local prefix = gyp_files[i][3]
197 local gyp_file = assert(io.open(filename), "failed to open GYP file") 197 local gyp_file = assert(io.open(filename), "failed to open GYP file")
198 local gyp = gyp_file:read('*a') 198 local gyp = gyp_file:read('*a')
199 for condition, sources in 199 for condition, sources in
200 gyp:gmatch "'sources': %[.-### gcmole%((.-)%) ###(.-)%]" do 200 gyp:gmatch "%[.-### gcmole%((.-)%) ###(.-)%]" do
201 if result[condition] == nil then result[condition] = {} end 201 if result[condition] == nil then result[condition] = {} end
202 for file in sources:gmatch(pattern) do 202 for file in sources:gmatch(pattern) do
203 table.insert(result[condition], prefix .. file) 203 table.insert(result[condition], prefix .. file)
204 end 204 end
205 end 205 end
206 gyp_file:close() 206 gyp_file:close()
207 end 207 end
208 208
209 return result 209 return result
210 end 210 end
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 443
444 for _, arch in ipairs(ARCHS) do 444 for _, arch in ipairs(ARCHS) do
445 if not ARCHITECTURES[arch] then 445 if not ARCHITECTURES[arch] then
446 error ("Unknown arch: " .. arch) 446 error ("Unknown arch: " .. arch)
447 end 447 end
448 448
449 errors = SafeCheckCorrectnessForArch(arch, report) or errors 449 errors = SafeCheckCorrectnessForArch(arch, report) or errors
450 end 450 end
451 451
452 os.exit(errors and 1 or 0) 452 os.exit(errors and 1 or 0)
OLDNEW
« no previous file with comments | « test/unittests/unittests.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698