From 87dd4fd367a509bb7ecf2df40d1d8d52f12af152 Mon Sep 17 00:00:00 2001 From: "gman@chromium.org" Date: Fri, 10 Dec 2010 22:37:54 +0000 Subject: Hard code number of auto generated command buffer unit tests per file so that tests do not move from file to file. The problem is gles2_cmd_decoder_n_unittest_autogen.h is dependent on gles2_cmd_decoder_n_unittest.cc So if a test moves to another generated file then the things it depends on do not move withit. TEST=none BUG=65400 Review URL: http://codereview.chromium.org/5686003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68897 0039d316-1c4b-4281-b951-d872f2087c98 --- gpu/command_buffer/build_gles2_cmd_buffer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gpu') diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index d6e4661..a3dabb2 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -5137,16 +5137,16 @@ class GLGenerator(object): def WriteServiceUnitTests(self, filename): """Writes the service decorder unit tests.""" num_tests = len(self.functions) - step = (num_tests + 1) / 2 + FUNCTIONS_PER_FILE = 98 # hard code this so it doesn't change. count = 0 - for test_num in range(0, num_tests, step): + for test_num in range(0, num_tests, FUNCTIONS_PER_FILE): count += 1 name = filename % count file = CHeaderWriter( name, "// It is included by gles2_cmd_decoder_unittest_%d.cc\n" % count) file.SetFileNum(count) - end = test_num + step + end = test_num + FUNCTIONS_PER_FILE if end > num_tests: end = num_tests for idx in range(test_num, end): -- cgit v1.1