rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
Returns: A list of test process info objects containing the following dictionary entries: 'test': the test name; 'proc': the Popen process instance for this test run. | Returns: A list of test process info objects containing the following dictionary entries: 'test': the test name; 'proc': the Popen process instance for this test run. | def _SpawnTests(self): """Spawns VMs and starts the test runs on them. | 3bab0321232e7900a9e827658ca48c5797d77023 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/3bab0321232e7900a9e827658ca48c5797d77023/cros_run_parallel_vm_tests.py |
Arguments: | Args: | def _WaitForCompletion(self, spawned_tests): """Waits for tests to complete and returns a list of failed tests. | 3bab0321232e7900a9e827658ca48c5797d77023 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/3bab0321232e7900a9e827658ca48c5797d77023/cros_run_parallel_vm_tests.py |
Returns: A list of failed test names. | Returns: A list of failed test names. | def _WaitForCompletion(self, spawned_tests): """Waits for tests to complete and returns a list of failed tests. | 3bab0321232e7900a9e827658ca48c5797d77023 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/3bab0321232e7900a9e827658ca48c5797d77023/cros_run_parallel_vm_tests.py |
runner = ParallelTestRunner(args) | runner = ParallelTestRunner(args, options.results_dir_root) | def main(): usage = 'Usage: %prog [options] tests...' parser = optparse.OptionParser(usage=usage) (options, args) = parser.parse_args() if not args: parser.print_help() Die('no tests provided') runner = ParallelTestRunner(args) runner.Run() | 3bab0321232e7900a9e827658ca48c5797d77023 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/3bab0321232e7900a9e827658ca48c5797d77023/cros_run_parallel_vm_tests.py |
cros_mark_as_stable._SimpleRunCommand('git remote update') | cros_mark_as_stable._SimpleRunCommand('repo sync .') | def testPushChange(self): git_log = 'Marking test_one as stable\nMarking test_two as stable\n' fake_description = 'Marking set of ebuilds as stable\n\n%s' % git_log self.mox.StubOutWithMock(cros_mark_as_stable, '_CheckOnStabilizingBranch') self.mox.StubOutWithMock(cros_mark_as_stable.GitBranch, 'CreateBranch') self.mox... | 892e6d8f3c3e3550112143588c41946b3bb8845c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/892e6d8f3c3e3550112143588c41946b3bb8845c/cros_mark_as_stable_unittest.py |
url_suffix = '%s/%s' % (_GS_HOST_PATH, version) | url_suffix = '%s/%s/' % (_GS_HOST_PATH, version) | def UploadPrebuilt(build_path, bucket, version, board=None, git_sync=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. bucket: The Google Storage bucket to upload to. board: The board to upload to Google Storage, if this is None upload host packages. g... | 01e134239426724f7c37221e9fcbfb878b77c6c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/01e134239426724f7c37221e9fcbfb878b77c6c5/prebuilt.py |
remote_path = urlparse.urljoin(base_remote_path, suffix) | remote_path = '%s/%s' % (base_remote_path.rstrip('/'), suffix) | def GenerateUploadDict(base_local_path, base_remote_path, pkgs): """Build a dictionary of local remote file key pairs to upload. Args: base_local_path: The base path to the files on the local hard drive. remote_path: The base path to the remote paths. pkgs: The packages to upload. Returns: Returns a dictionary of loc... | 74f0f17ad86ee04975501d1949c5a3d94f54b463 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/74f0f17ad86ee04975501d1949c5a3d94f54b463/prebuilt.py |
remote_location = urlparse.urljoin(upload_location, url_suffix) | remote_location = '%s/%s' % (upload_location.rstrip('/'), url_suffix) | def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False, git_sync_retries=5, key='PORTAGE_BINHOST', pkg_indexes=[], sync_binhost_conf=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The u... | 74f0f17ad86ee04975501d1949c5a3d94f54b463 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/74f0f17ad86ee04975501d1949c5a3d94f54b463/prebuilt.py |
remote_file = urlparse.urljoin(remote_location, 'Packages') | remote_file = '%s/Packages' % remote_location.rstrip('/') | def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False, git_sync_retries=5, key='PORTAGE_BINHOST', pkg_indexes=[], sync_binhost_conf=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The u... | 74f0f17ad86ee04975501d1949c5a3d94f54b463 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/74f0f17ad86ee04975501d1949c5a3d94f54b463/prebuilt.py |
if options.debug: | if not options.debug: | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | 9310bb6bd32e95da9cc36315c2679a871d88340c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/9310bb6bd32e95da9cc36315c2679a871d88340c/cbuildbot.py |
m_file.write('CROS_WORKON_COMMIT="my_id"') | m_file.write('CROS_WORKON_COMMIT="my_id"\n') | def testRevEBuild(self): self.mox.StubOutWithMock(cros_mark_as_stable.fileinput, 'input') self.mox.StubOutWithMock(cros_mark_as_stable.shutil, 'copyfile') m_file = self.mox.CreateMock(file) | 9f8e53b27b9afda125ee26125b13bd53a3627328 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/9f8e53b27b9afda125ee26125b13bd53a3627328/cros_mark_as_stable_unittest.py |
make_stable=False) | make_stable=mark_stable) | def MarkChromeEBuildAsStable(stable_candidate, unstable_ebuild, chrome_rev, chrome_version, commit, overlay_dir, sticky_ebuild): """Uprevs the chrome ebuild specified by chrome_rev. This is the main function that uprevs the chrome_rev from a stable candidate to its new version. Args: stable_candidate: ebuild that cor... | 70311cdfdd9acdbb885f442c1fcc17935f81d4c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/70311cdfdd9acdbb885f442c1fcc17935f81d4c6/cros_mark_chrome_as_stable.py |
unittest.main() | main(sys.argv) | def testTotMarkAsStable(self): """Tests to see if we can mark chrome for tot.""" self._CommonMarkAsStableTest(cros_mark_chrome_as_stable.TIP_OF_TRUNK, self.tot_new_version, self.tot_stable, self.tot_new, 'tot') | ed210b40ffcc57fc6e8287d209af30d06ff25008 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/ed210b40ffcc57fc6e8287d209af30d06ff25008/cros_mark_chrome_as_stable.py |
self.mox.StubOutWithMock(cbuildbot, '_CreateRepoDictionary') self.mox.StubOutWithMock(cbuildbot, '_ParseRevisionString') self.mox.StubOutWithMock(cbuildbot, '_UprevFromRevisionList') | """Test if we get actual revisions in revisions.pfq.""" | def testUprevPackages(self): self.mox.StubOutWithMock(cbuildbot, '_CreateRepoDictionary') self.mox.StubOutWithMock(cbuildbot, '_ParseRevisionString') self.mox.StubOutWithMock(cbuildbot, '_UprevFromRevisionList') self.mox.StubOutWithMock(__builtin__, 'open') | f485c86416129936641c08c5f3fc49d3811f0b36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f485c86416129936641c08c5f3fc49d3811f0b36/cbuildbot_unittest.py |
cbuildbot._CreateRepoDictionary(self._buildroot, self._test_board).AndReturn(self._test_dict) cbuildbot._ParseRevisionString(self._test_string, self._test_dict).AndReturn( self._test_parsed_string_array) cbuildbot._UprevFromRevisionList(self._buildroot, self._test_parsed_string_array) | cbuildbot.RunCommand(['./cros_mark_all_as_stable', '--tracking_branch="cros/master"'], cwd='%s/src/scripts' % self._buildroot, enter_chroot=True) self.mox.ReplayAll() cbuildbot._UprevPackages(self._buildroot, self._revision_file, self._test_board) self.mox.VerifyAll() def testUprevAllPackages(self): """Test if we get... | def testUprevPackages(self): self.mox.StubOutWithMock(cbuildbot, '_CreateRepoDictionary') self.mox.StubOutWithMock(cbuildbot, '_ParseRevisionString') self.mox.StubOutWithMock(cbuildbot, '_UprevFromRevisionList') self.mox.StubOutWithMock(__builtin__, 'open') | f485c86416129936641c08c5f3fc49d3811f0b36 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f485c86416129936641c08c5f3fc49d3811f0b36/cbuildbot_unittest.py |
self.vm_image_path = ('%s/chromiumos_qemu_image.bin' % os.path.dirname( base_image_path)) | self.vm_image_path = '%s/chromiumos_qemu_image.bin' % os.path.dirname( base_image_path) | def PrepareBase(self): """Creates an update-able VM based on base image.""" | 113739c109036eaeaecd28548f6eb14962004b5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/113739c109036eaeaecd28548f6eb14962004b5a/cros_au_test_harness.py |
Info('Qemu image not found, creating one.') | Info('Qemu image %s not found, creating one.' % self.vm_image_path) | def PrepareBase(self): """Creates an update-able VM based on base image.""" | 113739c109036eaeaecd28548f6eb14962004b5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/113739c109036eaeaecd28548f6eb14962004b5a/cros_au_test_harness.py |
Info('Using existing VM image') | Info('Using existing VM image %s' % self.vm_image_path) | def PrepareBase(self): """Creates an update-able VM based on base image.""" | 113739c109036eaeaecd28548f6eb14962004b5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/113739c109036eaeaecd28548f6eb14962004b5a/cros_au_test_harness.py |
if options.quick_test: _VERIFY_SUITE = 'build_RootFilesystemSize' | def VerifyImage(self, percent_required_to_pass): """Runs vm smoke suite to verify image.""" # image_to_live already verifies lsb-release matching. This is just # for additional steps. output = RunCommand(['%s/cros_run_vm_test' % self.crosutilsbin, '--image_path=%s' % self.vm_image_path, '--snapshot', '--persist', vm_g... | 113739c109036eaeaecd28548f6eb14962004b5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/113739c109036eaeaecd28548f6eb14962004b5a/cros_au_test_harness.py | |
def setUp(self): self.utf8 = "<?xml version='1.0' encoding='UTF-8'?>\n" self.tiny_manifest = '<manifest>\n</manifest>' | def setUp(self): self.utf8 = "<?xml version='1.0' encoding='UTF-8'?>\n" self.tiny_manifest = '<manifest>\n</manifest>' | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py | |
def testSimpleParse(self): ptree = loman.LocalManifest() ptree.Parse() | class LocalManifest: """Class which provides an abstraction for manipulating the local manifest.""" | def testSimpleParse(self): ptree = loman.LocalManifest() ptree.Parse() | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def testParse(self): ptree = loman.LocalManifest(self.tiny_manifest) ptree.Parse() self.assertEqual(ptree.ToString(), self.utf8 + self.tiny_manifest) | def __init__(self, text=None): self._text = text or '<manifest>\n</manifest>' | def testParse(self): ptree = loman.LocalManifest(self.tiny_manifest) ptree.Parse() self.assertEqual(ptree.ToString(), self.utf8 + self.tiny_manifest) | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def testUTF8Parse(self): ptree = loman.LocalManifest(self.utf8 + self.tiny_manifest) ptree.Parse() self.assertEqual(ptree.ToString(), self.utf8 + self.tiny_manifest) | def Parse(self): """Parse the manifest.""" self._root = ElementTree.fromstring(self._text) | def testUTF8Parse(self): ptree = loman.LocalManifest(self.utf8 + self.tiny_manifest) ptree.Parse() self.assertEqual(ptree.ToString(), self.utf8 + self.tiny_manifest) | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def testAddNew(self): ptree = loman.LocalManifest('<manifest>\n</manifest>') ptree.Parse() self.assertTrue(ptree.AddWorkonProject('foo', 'path/to/foo')) self.assertEqual( ptree.ToString(), self.utf8 + '<manifest>\n' '<project name="foo" path="path/to/foo" workon="True" />\n' '</manifest>') | def AddWorkonProject(self, name, path): """Add a new workon project if it is not already in the manifest. | def testAddNew(self): ptree = loman.LocalManifest('<manifest>\n</manifest>') ptree.Parse() self.assertTrue(ptree.AddWorkonProject('foo', 'path/to/foo')) self.assertEqual( ptree.ToString(), self.utf8 + '<manifest>\n' '<project name="foo" path="path/to/foo" workon="True" />\n' '</manifest>') | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def testAddDup(self): ptree = loman.LocalManifest('<manifest>\n</manifest>') ptree.Parse() ptree.AddWorkonProject('foo', 'path/to/foo') self.assertTrue(not ptree.AddWorkonProject('foo', 'path/to/foo')) self.assertTrue(not ptree.AddWorkonProject('foo', 'path/foo')) self.assertTrue(not ptree.AddWorkonProject('foobar', 'p... | Returns: True on success. """ | def testAddDup(self): ptree = loman.LocalManifest('<manifest>\n</manifest>') ptree.Parse() ptree.AddWorkonProject('foo', 'path/to/foo') self.assertTrue(not ptree.AddWorkonProject('foo', 'path/to/foo')) self.assertTrue(not ptree.AddWorkonProject('foo', 'path/foo')) self.assertTrue(not ptree.AddWorkonProject('foobar', 'p... | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
class MainTest(unittest.TestCase): | for project in self._root.findall('project'): if project.attrib['path'] == path or project.attrib['name'] == name: return False self._AddProject(name, path, workon='True') return True | def testAddDup(self): ptree = loman.LocalManifest('<manifest>\n</manifest>') ptree.Parse() ptree.AddWorkonProject('foo', 'path/to/foo') self.assertTrue(not ptree.AddWorkonProject('foo', 'path/to/foo')) self.assertTrue(not ptree.AddWorkonProject('foo', 'path/foo')) self.assertTrue(not ptree.AddWorkonProject('foobar', 'p... | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def setUp(self): self.utf8 = "<?xml version='1.0' encoding='UTF-8'?>\n" self.tiny_manifest = '<manifest>\n</manifest>' self.stderr = sys.stderr sys.stderr = StringIO.StringIO() | def _AddProject(self, name, path, workon='False'): element = ElementTree.Element('project', name=name, path=path, workon=workon) element.tail = '\n' self._root.append(element) | def setUp(self): self.utf8 = "<?xml version='1.0' encoding='UTF-8'?>\n" self.tiny_manifest = '<manifest>\n</manifest>' self.stderr = sys.stderr sys.stderr = StringIO.StringIO() | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def tearDown(self): sys.stderr = self.stderr | def ToString(self): return ElementTree.tostring(self._root, encoding='UTF-8') | def tearDown(self): sys.stderr = self.stderr | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def testNotEnoughArgs(self): err_msg = 'Not enough arguments\n' self.assertRaises(SystemExit, loman.main, ['loman']) self.assertTrue(sys.stderr.getvalue().endswith(err_msg)) | def testNotEnoughArgs(self): err_msg = 'Not enough arguments\n' self.assertRaises(SystemExit, loman.main, ['loman']) self.assertTrue(sys.stderr.getvalue().endswith(err_msg)) | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py | |
def testNotWorkon(self): err_msg = 'Adding of non-workon projects is currently unsupported.\n' self.assertRaises(SystemExit, loman.main, ['loman', 'add', 'foo', 'path']) self.assertTrue(sys.stderr.getvalue().endswith(err_msg)) | def main(argv): usage = 'usage: %prog add [options] <name> <path>' parser = optparse.OptionParser(usage=usage) parser.add_option('-w', '--workon', action='store_true', dest='workon', default=False, help='Is this a workon package?') parser.add_option('-f', '--file', dest='manifest', help='Non-default manifest file to re... | def testNotWorkon(self): err_msg = 'Adding of non-workon projects is currently unsupported.\n' self.assertRaises(SystemExit, loman.main, ['loman', 'add', 'foo', 'path']) self.assertTrue(sys.stderr.getvalue().endswith(err_msg)) | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
def testBadCommand(self): err_msg = 'Unsupported command: bad.\n' self.assertRaises(SystemExit, loman.main, ['loman', 'bad', 'foo', 'path']) self.assertTrue(sys.stderr.getvalue().endswith(err_msg)) def testSimpleAdd(self): temp = tempfile.NamedTemporaryFile('w') print >> temp, '<manifest>\n</manifest>' temp.flush() os... | repo_dir = _FindRepoDir() if not repo_dir: Die("Unable to find repo dir.") local_manifest = options.manifest or \ os.path.join(_FindRepoDir(), 'local_manifest.xml') if os.path.isfile(local_manifest): ptree = LocalManifest(open(local_manifest).read()) else: ptree = LocalManifest() ptree.Parse() if not ptree.AddWorkonPro... | def testBadCommand(self): err_msg = 'Unsupported command: bad.\n' self.assertRaises(SystemExit, loman.main, ['loman', 'bad', 'foo', 'path']) self.assertTrue(sys.stderr.getvalue().endswith(err_msg)) | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
unittest.main() | main(sys.argv) | def testAddDup(self): temp = tempfile.NamedTemporaryFile('w') print >> temp, '<manifest>\n</manifest>' temp.flush() os.fsync(temp.fileno()) loman.main(['loman', 'add', '--workon', '-f', temp.name, 'foo', 'path/to/foo']) self.assertRaises(SystemExit, loman.main, ['loman', 'add', '--workon', '-f', temp.name, 'foo', 'path... | 865a42edee4aa895681f5445eae8c6995e344861 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/865a42edee4aa895681f5445eae8c6995e344861/loman.py |
_UploadPrebuilts(buildroot, board, buildconfig['rev_overlays'], [new_binhost]) | if not options.debug: _UploadPrebuilts(buildroot, board, buildconfig['rev_overlays'], [new_binhost]) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | 1a4a9665d4c6e976cba2200294dbd61c8936bfcc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/1a4a9665d4c6e976cba2200294dbd61c8936bfcc/cbuildbot.py |
if options.sync: _Build(buildroot, emptytree) | _Build(buildroot, emptytree) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-a', '--acl', default='private', help='ACL to set on GSD archives') parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option... | 6b69ba71218c4d6eed73e564829b112200a56887 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/6b69ba71218c4d6eed73e564829b112200a56887/cbuildbot.py |
if not os.path.isdir(path): | if command != 'clean' and not os.path.isdir(path): | def main(argv): try: argv = gflags.FLAGS(argv) if len(argv) != 2: _PrintUsageAndDie('Must specify a valid command') else: command = argv[1] except gflags.FlagsError, e : _PrintUsageAndDie(str(e)) package_list = gflags.FLAGS.packages.split(':') _CheckSaneArguments(package_list, command) if gflags.FLAGS.overlays: overla... | f7502a6e03df7073fc0ce17b15c7f2349175fe0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f7502a6e03df7073fc0ce17b15c7f2349175fe0e/cros_mark_as_stable.py |
'rsync -av %(pkg_index)s %(remote_location)s/Packages' % d] | 'rsync -av --chmod=a+r %(pkg_index)s %(remote_packages)s' % d] | def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False, git_sync_retries=5, key='PORTAGE_BINHOST', pkg_indexes=[], sync_binhost_conf=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The u... | a8ae0bc63b359b13a6d53afb50ac2efccba5eac6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/a8ae0bc63b359b13a6d53afb50ac2efccba5eac6/prebuilt.py |
equery_cmd = 'equery-%s which %s 2> /dev/null' \ % (gflags.FLAGS.board, package) | equery_cmd = ( 'ACCEPT_KEYWORDS="x86 arm amd64" equery-%s which %s 2> /dev/null' % (gflags.FLAGS.board, package)) | def _FindEBuildPath(cls, package): """Static method that returns the full path of an ebuild.""" _Print('Looking for unstable ebuild for %s' % package) equery_cmd = 'equery-%s which %s 2> /dev/null' \ % (gflags.FLAGS.board, package) path = _SimpleRunCommand(equery_cmd) if path: _Print('Unstable ebuild found at %s' % pat... | 57e9808254881743c63bf17441843d2461b27c85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/57e9808254881743c63bf17441843d2461b27c85/cros_mark_as_stable.py |
], cwd=cwd, error_ok=True) | ], cwd=cwd, error_ok=False) | def _RunSmokeSuite(buildroot): cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['bin/cros_run_vm_test', '--no_graphics', '--test_case', 'suite_Smoke', ], cwd=cwd, error_ok=True) | 4befe39060d6a3827a7be00c0f99f6b26efbfce4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/4befe39060d6a3827a7be00c0f99f6b26efbfce4/cbuildbot.py |
image_path=None, results_dir_root=None): | image_path=None, order_output=False, results_dir_root=None): | def __init__(self, tests, base_ssh_port=_DEFAULT_BASE_SSH_PORT, board=None, image_path=None, results_dir_root=None): """Constructs and initializes the test runner class. | c0644eb90ae0137602284a65f2e88850220ed3a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/c0644eb90ae0137602284a65f2e88850220ed3a0/cros_run_parallel_vm_tests.py |
proc = subprocess.Popen(args, stdin=dev_null) | output = None if self._order_output: output = tempfile.NamedTemporaryFile(prefix='parallel_vm_test_') Info('Piping output to %s.' % output.name) proc = subprocess.Popen(args, stdin=dev_null, stdout=output, stderr=output) | def _SpawnTests(self): """Spawns VMs and starts the test runs on them. | c0644eb90ae0137602284a65f2e88850220ed3a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/c0644eb90ae0137602284a65f2e88850220ed3a0/cros_run_parallel_vm_tests.py |
'proc': proc } | 'proc': proc, 'output': output } | def _SpawnTests(self): """Spawns VMs and starts the test runs on them. | c0644eb90ae0137602284a65f2e88850220ed3a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/c0644eb90ae0137602284a65f2e88850220ed3a0/cros_run_parallel_vm_tests.py |
options.image_path, options.results_dir_root) | options.image_path, options.order_output, options.results_dir_root) | def main(): usage = 'Usage: %prog [options] tests...' parser = optparse.OptionParser(usage=usage) parser.add_option('--base_ssh_port', type='int', default=_DEFAULT_BASE_SSH_PORT, help='Base SSH port. Spawned VMs listen to localhost SSH ' 'ports incrementally allocated starting from the base one. ' '[default: %default]'... | c0644eb90ae0137602284a65f2e88850220ed3a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/c0644eb90ae0137602284a65f2e88850220ed3a0/cros_run_parallel_vm_tests.py |
self.download_folder = os.path.join(self.crosutilsbin, 'latest_download') | self.download_folder = os.path.join(self.crosutils, 'latest_download') if not os.path.exists(self.download_folder): os.makedirs(self.download_folder) | def setUp(self): unittest.TestCase.setUp(self) # Set these up as they are used often. self.crosutils = os.path.join(os.path.dirname(__file__), '..') self.crosutilsbin = os.path.join(os.path.dirname(__file__)) self.download_folder = os.path.join(self.crosutilsbin, 'latest_download') | e55c89ab447531e081497a8c4fbc47b4bc1b20dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/e55c89ab447531e081497a8c4fbc47b4bc1b20dd/cros_au_test_harness.py |
def _UpdateImageReportError(self, image_path, stateful_change='old'): """Calls UpdateImage and reports any error to the console. Still throws the exception. """ try: self.UpdateImage(image_path, stateful_change) except UpdateException as err: # If the update fails, print it out Warning(err.stdout) raise | e55c89ab447531e081497a8c4fbc47b4bc1b20dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/e55c89ab447531e081497a8c4fbc47b4bc1b20dd/cros_au_test_harness.py | ||
def PrepareBase(self, image_path): """Creates an update-able VM based on base image.""" self.vm_image_path = '%s/chromiumos_qemu_image.bin' % os.path.dirname( image_path) Info('Creating: %s' % self.vm_image_path) | e55c89ab447531e081497a8c4fbc47b4bc1b20dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/e55c89ab447531e081497a8c4fbc47b4bc1b20dd/cros_au_test_harness.py | ||
def BuildStateful(self, src, dst): | def BuildStateful(self, src, dst_dir, dst_file): | def BuildStateful(self, src, dst): """Create a stateful partition update image.""" | f7597abb17c8d35c7ee33d2707f30473839092b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f7597abb17c8d35c7ee33d2707f30473839092b1/cros_image_to_target.py |
if self.GetCached(src, dst): self.Info('Using cached stateful %s' % dst) | if self.GetCached(src, dst_file): self.Info('Using cached stateful %s' % dst_file) | def BuildStateful(self, src, dst): """Create a stateful partition update image.""" | f7597abb17c8d35c7ee33d2707f30473839092b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f7597abb17c8d35c7ee33d2707f30473839092b1/cros_image_to_target.py |
cgpt = self.ChrootPath('/usr/bin/cgpt') offset = self.cmd.OutputOneLine(cgpt, 'show', '-b', '-i', '1', src) size = self.cmd.OutputOneLine(cgpt, 'show', '-s', '-i', '1', src) if None in (size, offset): self.Error('Unable to use cgpt to get image geometry') return False return self.cmd.RunPipe([['dd', 'if=%s' % src, 'bs... | return self.cmd.Run(self.CrosUtilsPath( 'cros_generate_stateful_update_payload'), '--image=%s' % src, '--output=%s' % dst_dir) | def BuildStateful(self, src, dst): """Create a stateful partition update image.""" | f7597abb17c8d35c7ee33d2707f30473839092b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f7597abb17c8d35c7ee33d2707f30473839092b1/cros_image_to_target.py |
not cros_env.BuildStateful(image_file, stateful_file)): | not cros_env.BuildStateful(image_file, image_directory, stateful_file)): | def main(argv): usage = 'usage: %prog [options]' parser = optparse.OptionParser(usage=usage) parser.add_option('--board', dest='board', default=None, help='Board platform type') parser.add_option('--force-mismatch', dest='force_mismatch', default=False, action='store_true', help='Upgrade even if client arch does not ma... | f7597abb17c8d35c7ee33d2707f30473839092b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/f7597abb17c8d35c7ee33d2707f30473839092b1/cros_image_to_target.py |
_SimpleRunCommand('git remote update') merge_branch = _GitBranch(merge_branch_name) merge_branch.CreateBranch() if not merge_branch.Exists(): Die('Unable to create merge branch.') _SimpleRunCommand('git merge --squash %s' % _STABLE_BRANCH_NAME) _SimpleRunCommand('git commit -m "%s"' % description) _SimpleRunCommand('g... | for push_try in range(num_retries + 1): try: _SimpleRunCommand('git remote update') merge_branch = _GitBranch(merge_branch_name) merge_branch.CreateBranch() if not merge_branch.Exists(): Die('Unable to create merge branch.') _SimpleRunCommand('git merge --squash %s' % _STABLE_BRANCH_NAME) _SimpleRunCommand('git commit ... | def _PushChange(): """Pushes changes to the git repository. Pushes locals commits from calls to CommitChange to the remote git repository specified by os.pwd. Raises: OSError: Error occurred while pushing. """ # TODO(sosa) - Add logic for buildbot to check whether other slaves have # completed and push this change o... | 684d5dbccf1579fe9a3ac299988fcc1c8ed52584 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/684d5dbccf1579fe9a3ac299988fcc1c8ed52584/cros_mark_as_stable.py |
capture=False, oneline=False): """Perform a command pipeline, with optional input/output filenames.""" | capture=False, oneline=False, hide_stderr=False): """ Perform a command pipeline, with optional input/output filenames. hide_stderr Don't allow output of stderr (default False) """ | def RunPipe(self, pipeline, infile=None, outfile=None, capture=False, oneline=False): """Perform a command pipeline, with optional input/output filenames.""" | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
self.env.Info('Running: %s' % ' '.join(cmd)) | if hide_stderr: kwargs['stderr'] = open('/dev/null', 'wb') self.env.Debug('Running: %s' % ' '.join(cmd)) | def RunPipe(self, pipeline, infile=None, outfile=None, capture=False, oneline=False): """Perform a command pipeline, with optional input/output filenames.""" | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
def __init__(self, verbose=False): | SILENT = 0 INFO = 1 DEBUG = 2 def __init__(self, verbose=SILENT): | def __init__(self, verbose=False): self.cros_root = os.path.dirname(os.path.abspath(sys.argv[0])) parent = os.path.dirname(self.cros_root) if os.path.exists(os.path.join(parent, 'chromeos-common.sh')): self.cros_root = parent self.cmd = Command(self) self.verbose = verbose | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
if self.verbose: | if self.verbose >= CrosEnv.INFO: | def Info(self, msg): if self.verbose: print 'INFO: %s' % msg | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
verbose=self.verbose)) | verbose=self.verbose, have_pv=self.have_pv)) | def CreateServer(self, port, update_file, stateful_file): """Start the devserver clone.""" | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
verbose=self.verbose)) | verbose=self.verbose, have_pv=self.have_pv)) | def CreateServer(self, port, update_file, stateful_file): """Start the devserver clone.""" | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
print 'Client update completed successfully!' | self.Info('Client update completed successfully!') | def StartClient(self, port): """Ask the client machine to update from our server.""" | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
handler.send_Error(404, 'File not found') | handler.send_error(404, 'File not found') | def Reply(self, handler, send_content=True, post_data=None): handler.send_Error(404, 'File not found') return None | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
verbose=False, blocksize=16*1024): | verbose=False, blocksize=16*1024, have_pv=False): | def __init__(self, filename, content_type='application/octet-stream', verbose=False, blocksize=16*1024): self.filename = filename self.content_type = content_type self.verbose = verbose self.blocksize = blocksize | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
if not send_content: return if filesize <= self.blocksize: handler.wfile.write(f.read()) else: | if send_content: | def Reply(self, handler, send_content=True, post_data=None): """Return file contents to the client. Optionally display progress.""" | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
default=DEFAULT_IMAGE_NAME, | def main(argv): usage = 'usage: %prog [options]' parser = optparse.OptionParser(usage=usage) parser.add_option('--board', dest='board', default=None, help='Board platform type') parser.add_option('--force-mismatch', dest='force_mismatch', default=False, action='store_true', help='Upgrade even if client arch does not ma... | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py | |
cros_env = CrosEnv(verbose=options.verbose) | build_test_image = False verbosity = CrosEnv.SILENT if options.verbose: verbosity = CrosEnv.INFO if options.debug: verbosity = CrosEnv.DEBUG cros_env = CrosEnv(verbose=verbosity) | def main(argv): usage = 'usage: %prog [options]' parser = optparse.OptionParser(usage=usage) parser.add_option('--board', dest='board', default=None, help='Board platform type') parser.add_option('--force-mismatch', dest='force_mismatch', default=False, action='store_true', help='Upgrade even if client arch does not ma... | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py |
update_file = os.path.join(image_directory, UPDATE_FILENAME) stateful_file = os.path.join(image_directory, STATEFUL_FILENAME) | def main(argv): usage = 'usage: %prog [options]' parser = optparse.OptionParser(usage=usage) parser.add_option('--board', dest='board', default=None, help='Board platform type') parser.add_option('--force-mismatch', dest='force_mismatch', default=False, action='store_true', help='Upgrade even if client arch does not ma... | d73ec0e2a82d0924131576dc827f976c3a5121a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/d73ec0e2a82d0924131576dc827f976c3a5121a8/cros_image_to_target.py | |
'url.ssh://gitrw.chromium.org.pushinsteadof', | 'url.ssh://git@gitrw.chromium.org:9222.pushinsteadof', | def _FullCheckout(buildroot): MakeDir(buildroot, parents=True) RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], cwd=buildroot, input='\n\ny\n') RunCommand(['repo', 'sync'], cwd=buildroot) RunCommand(['repo', 'forall', '-c', 'git', 'config', 'url.ssh://gitrw.chromium.org.pushinsteadof', 'http:/... | 6718164717cbaf7391ed1afe2d818ed4dd4889a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/6718164717cbaf7391ed1afe2d818ed4dd4889a0/cbuildbot.py |
dev_null = open('/dev/null') | def _SpawnTests(self): """Spawns VMs and starts the test runs on them. | 4b029a27f81d7d3c64299f2703d7beed544f3469 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/4b029a27f81d7d3c64299f2703d7beed544f3469/cros_run_parallel_vm_tests.py | |
proc = subprocess.Popen(args, stdin=dev_null, stdout=output, stderr=output) | proc = subprocess.Popen(args, stdout=output, stderr=output) | def _SpawnTests(self): """Spawns VMs and starts the test runs on them. | 4b029a27f81d7d3c64299f2703d7beed544f3469 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/4b029a27f81d7d3c64299f2703d7beed544f3469/cros_run_parallel_vm_tests.py |
RunCommand(['repo', '--trace', 'sync'], cwd=buildroot) | def RepoSync(buildroot, retries=_DEFAULT_RETRIES): """Uses repo to checkout the source code. Keyword arguments: retries -- Number of retries to try before failing on the sync. """ while retries > 0: try: # The --trace option ensures that repo shows the output from git. This # is needed so that the buildbot can kill us... | b1d17e24eb5027aa7057d330390cbb27e42d0b93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/b1d17e24eb5027aa7057d330390cbb27e42d0b93/cbuildbot.py | |
def _Build(buildroot): | def _Build(buildroot, emptytree): | def _Build(buildroot): """Wrapper around build_packages.""" cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./build_packages'], cwd=cwd, enter_chroot=True) | ab5c6917c6892b847a7559559dc2a6ae244bee52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/ab5c6917c6892b847a7559559dc2a6ae244bee52/cbuildbot.py |
RunCommand(['./build_packages'], cwd=cwd, enter_chroot=True) | cmd = ['./build_packages'] if emptytree: cmd.insert(0, 'EXTRA_BOARD_FLAGS=--emptytree') RunCommand(cmd, cwd=cwd, enter_chroot=True) | def _Build(buildroot): """Wrapper around build_packages.""" cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./build_packages'], cwd=cwd, enter_chroot=True) | ab5c6917c6892b847a7559559dc2a6ae244bee52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/ab5c6917c6892b847a7559559dc2a6ae244bee52/cbuildbot.py |
if old_binhost and old_binhost != new_binhost: RunCommand(['sudo', 'rm', '-rf', boardpath]) | emptytree = (old_binhost and old_binhost != new_binhost) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | ab5c6917c6892b847a7559559dc2a6ae244bee52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/ab5c6917c6892b847a7559559dc2a6ae244bee52/cbuildbot.py |
_Build(buildroot) | _Build(buildroot, emptytree) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | ab5c6917c6892b847a7559559dc2a6ae244bee52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/ab5c6917c6892b847a7559559dc2a6ae244bee52/cbuildbot.py |
pid = RunCommand(['sudo', 'cat', pid_file], redirect_stdout=True, enter_chroot=False) if pid: RunCommand(['sudo', 'kill', pid.strip()], error_ok=True, enter_chroot=False) RunCommand(['sudo', 'rm', pid_file], enter_chroot=False) | RunCommand(['./cros_stop_vm', '--kvm_pid=%s' % pid_file], cwd=self.crosutilsbin) assert not os.path.exists(pid_file) | def _KillExistingVM(self, pid_file): if os.path.exists(pid_file): Warning('Existing %s found. Deleting and killing process' % pid_file) pid = RunCommand(['sudo', 'cat', pid_file], redirect_stdout=True, enter_chroot=False) if pid: RunCommand(['sudo', 'kill', pid.strip()], error_ok=True, enter_chroot=False) RunCommand([... | 4e32890c9b3884116fcbf79af40103b7853b5752 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/4e32890c9b3884116fcbf79af40103b7853b5752/cros_au_test_harness.py |
def _PreFlightRinse(buildroot): """Cleans up any leftover state from previous runs.""" RunCommand(['sudo', 'killall', 'kvm'], error_ok=True) _UprevCleanup(buildroot, error_ok=True) | def _PreFlightRinse(buildroot): """Cleans up any leftover state from previous runs.""" RunCommand(['sudo', 'killall', 'kvm'], error_ok=True) _UprevCleanup(buildroot, error_ok=True) | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py | |
def _WipeOldOutput(buildroot): RunCommand(['rm', '-rf', 'src/build/images'], cwd=buildroot) | def _Build(buildroot): """Wrapper around build_packages.""" cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./build_packages'], cwd=cwd, enter_chroot=True) | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py | |
def _UprevCleanup(buildroot, error_ok=False): """Clean up after a previous uprev attempt.""" cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./cros_mark_as_stable', '--srcroot=..', '--tracking_branch="cros/master"', 'clean'], cwd=cwd, error_ok=error_ok) | def _UprevPackages(buildroot, revisionfile, board): """Uprevs a package based on given revisionfile. If revisionfile is set to None or does not resolve to an actual file, this function will uprev all packages. Keyword arguments: revisionfile -- string specifying a file that contains a list of revisions to uprev. """ ... | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py | |
if options.clobber: RunCommand(['sudo', 'rm', '-rf', buildroot]) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py | |
if not os.path.isdir(buildroot): | _PreFlightRinse(buildroot) if options.clobber or not os.path.isdir(buildroot): | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py |
_PreFlightRinse(buildroot) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py | |
_UprevCleanup(buildroot) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py | |
_UprevCleanup(buildroot) | def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('... | dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py | |
main() | try: main() except Exception: print "Got exception." traceback.print_exc(file=sys.stdout) | def main(): parser = optparse.OptionParser() parser.add_option('-b', '--board', help='board for the image to compare against.') parser.add_option('-c', '--channel', help='channel for the image to compare against.') parser.add_option('-l', '--latestbase', help='Base url for latest links.') parser.add_option('-z', '--zip... | e695541bc6d1adf66a313ed22c2a475fd4e38a73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/e695541bc6d1adf66a313ed22c2a475fd4e38a73/ctest.py |
RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], | RunCommand(['repo', 'init', '-u', 'http://git.chromium.org/git/manifest'], | def _FullCheckout(buildroot, rw_checkout=True, retries=_DEFAULT_RETRIES): """Performs a full checkout and clobbers any previous checkouts.""" RunCommand(['sudo', 'rm', '-rf', buildroot]) MakeDir(buildroot, parents=True) RunCommand(['repo', 'init', '-u', 'http://src.chromium.org/git/manifest'], cwd=buildroot, input='\n\... | ef9f04e2fd60a7f7cfdb8306c6d988812fd47bef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/ef9f04e2fd60a7f7cfdb8306c6d988812fd47bef/cbuildbot.py |
return GetNewestLinkFromZipBase(board, channel, zip_server_base) | try: return GetNewestLinkFromZipBase(board, channel, zip_server_base) except: Warning('Failed to get url from standard zip base. Trying rc.') return GetNewestLinkFromZipBase(board + '-rc', channel, zip_server_base) | def GetLatestZipUrl(board, channel, latest_url_base, zip_server_base): """Returns the url of the latest image zip for the given arguments. Args: board: board for the image zip. channel: channel for the image zip. latest_url_base: base url for latest links. zip_server_base: base url for zipped images. """ if latest_ur... | 4f09b96e70a2a8cc3b70e1ae9fa4642a7f16b405 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/4f09b96e70a2a8cc3b70e1ae9fa4642a7f16b405/ctest.py |
num_procs = int(RunCommand('grep -c processor /proc/cpuinfo'.split(), print_cmd=False, redirect_stdout=True)) | def RepoSync(buildroot, rw_checkout=False, retries=_DEFAULT_RETRIES): """Uses repo to checkout the source code. Keyword arguments: rw_checkout -- Reconfigure repo after sync'ing to read-write. retries -- Number of retries to try before failing on the sync. """ # Get the number of processors to use with repo sync. num... | 7bf8d2715edc720c64adccd5c08347bee1aa56b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/7bf8d2715edc720c64adccd5c08347bee1aa56b2/cbuildbot.py | |
RunCommand(['repo', 'sync', '--jobs=%d' % (num_procs)], cwd=buildroot) | RunCommand(['repo', '--trace', 'sync'], cwd=buildroot) | def RepoSync(buildroot, rw_checkout=False, retries=_DEFAULT_RETRIES): """Uses repo to checkout the source code. Keyword arguments: rw_checkout -- Reconfigure repo after sync'ing to read-write. retries -- Number of retries to try before failing on the sync. """ # Get the number of processors to use with repo sync. num... | 7bf8d2715edc720c64adccd5c08347bee1aa56b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/7bf8d2715edc720c64adccd5c08347bee1aa56b2/cbuildbot.py |
passwd = urllib.quote_plus(getpass.getpass(prompt='')) | passwd = getpass.getpass(prompt='') | def Authenticate(): default_username = getpass.getuser() username = os.environ.get('GSDCURL_USERNAME') if username is None: sys.stderr.write('Username [' + default_username + ']: ') username = raw_input() if username == '': username = default_username + '@google.com' elif '@' not in username: username = username + '@go... | 138904ef93b0f7afdc4ae33b1388e2b74c868c1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/138904ef93b0f7afdc4ae33b1388e2b74c868c1a/cros_gsdcurl.py |
'-d', 'Passwd=' + passwd, | '-d', 'Passwd=' + urllib.quote_plus(passwd), | def Authenticate(): default_username = getpass.getuser() username = os.environ.get('GSDCURL_USERNAME') if username is None: sys.stderr.write('Username [' + default_username + ']: ') username = raw_input() if username == '': username = default_username + '@google.com' elif '@' not in username: username = username + '@go... | 138904ef93b0f7afdc4ae33b1388e2b74c868c1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/138904ef93b0f7afdc4ae33b1388e2b74c868c1a/cros_gsdcurl.py |
cmd = ['./build_packages'] | def _Build(buildroot, emptytree): """Wrapper around build_packages.""" cwd = os.path.join(buildroot, 'src', 'scripts') cmd = ['./build_packages'] if emptytree: cmd.insert(0, 'EXTRA_BOARD_FLAGS=--emptytree') RunCommand(cmd, cwd=cwd, enter_chroot=True) | 9b0127c6f57b06f06167b9186bd732214065170d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/9b0127c6f57b06f06167b9186bd732214065170d/cbuildbot.py | |
cmd.insert(0, 'EXTRA_BOARD_FLAGS=--emptytree') | cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree ./build_packages'] else: cmd = ['./build_packages'] | def _Build(buildroot, emptytree): """Wrapper around build_packages.""" cwd = os.path.join(buildroot, 'src', 'scripts') cmd = ['./build_packages'] if emptytree: cmd.insert(0, 'EXTRA_BOARD_FLAGS=--emptytree') RunCommand(cmd, cwd=cwd, enter_chroot=True) | 9b0127c6f57b06f06167b9186bd732214065170d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/9b0127c6f57b06f06167b9186bd732214065170d/cbuildbot.py |
RunCommand(unmerge_board_cmd, env=env) | RunCommand(unmerge_board_cmd) | def _CleanStalePackages(board, package_array): """Cleans up stale package info from a previous build.""" Info('Cleaning up stale packages %s.' % package_array) unmerge_board_cmd = ['emerge-%s' % board, '--unmerge'] unmerge_board_cmd.extend(package_array) RunCommand(unmerge_board_cmd, env=env) unmerge_host_cmd = ['sudo... | a851fe004ac4fd2c26ee8b76139bfc67d42a1c02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/a851fe004ac4fd2c26ee8b76139bfc67d42a1c02/cros_mark_as_stable.py |
RunCommand(unmerge_host_cmd, env=env) | RunCommand(unmerge_host_cmd) | def _CleanStalePackages(board, package_array): """Cleans up stale package info from a previous build.""" Info('Cleaning up stale packages %s.' % package_array) unmerge_board_cmd = ['emerge-%s' % board, '--unmerge'] unmerge_board_cmd.extend(package_array) RunCommand(unmerge_board_cmd, env=env) unmerge_host_cmd = ['sudo... | a851fe004ac4fd2c26ee8b76139bfc67d42a1c02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/a851fe004ac4fd2c26ee8b76139bfc67d42a1c02/cros_mark_as_stable.py |
(_CHROMIUMOS_OVERLAYS_DIRECTORY, _STABLE_BRANCH_NAME)) | (os.getcwd(), _STABLE_BRANCH_NAME)) | def _PushChange(): """Pushes changes to the git repository. Pushes locals commits from calls to CommitChange to the remote git repository specified by os.pwd. Raises: OSError: Error occurred while pushing. """ # TODO(sosa) - Add logic for buildbot to check whether other slaves have # completed and push this change o... | 52ed3f969a6f70a1ba9767de39064db467fdc4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/52ed3f969a6f70a1ba9767de39064db467fdc4b9/cros_mark_as_stable.py |
os.chdir(_CHROMIUMOS_OVERLAYS_DIRECTORY) | overlay_directory = '%s/third_party/chromiumos-overlay' % gflags.FLAGS.srcroot os.chdir(overlay_directory) | def main(argv): try: argv = gflags.FLAGS(argv) if len(argv) != 2: _PrintUsageAndDie('Must specify a valid command') else: command = argv[1] except gflags.FlagsError, e : _PrintUsageAndDie(str(e)) package_list = gflags.FLAGS.packages.split() if gflags.FLAGS.commit_ids: commit_id_list = gflags.FLAGS.commit_ids.split() e... | 52ed3f969a6f70a1ba9767de39064db467fdc4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/52ed3f969a6f70a1ba9767de39064db467fdc4b9/cros_mark_as_stable.py |
_CHROMIUMOS_OVERLAYS_DIRECTORY) | overlay_directory) | def main(argv): try: argv = gflags.FLAGS(argv) if len(argv) != 2: _PrintUsageAndDie('Must specify a valid command') else: command = argv[1] except gflags.FlagsError, e : _PrintUsageAndDie(str(e)) package_list = gflags.FLAGS.packages.split() if gflags.FLAGS.commit_ids: commit_id_list = gflags.FLAGS.commit_ids.split() e... | 52ed3f969a6f70a1ba9767de39064db467fdc4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/52ed3f969a6f70a1ba9767de39064db467fdc4b9/cros_mark_as_stable.py |
(package_list[:index], _CHROMIUMOS_OVERLAYS_DIRECTORY)) | (package_list[:index], overlay_directory)) | def main(argv): try: argv = gflags.FLAGS(argv) if len(argv) != 2: _PrintUsageAndDie('Must specify a valid command') else: command = argv[1] except gflags.FlagsError, e : _PrintUsageAndDie(str(e)) package_list = gflags.FLAGS.packages.split() if gflags.FLAGS.commit_ids: commit_id_list = gflags.FLAGS.commit_ids.split() e... | 52ed3f969a6f70a1ba9767de39064db467fdc4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/52ed3f969a6f70a1ba9767de39064db467fdc4b9/cros_mark_as_stable.py |
_RunCommand('git cl upload --desc_from_logs -m "%s"' % 'Marking set of ebuilds as stable') | description = _RunCommand('git log --format=format:%s%n%n%b ' + gflags.FLAGS.tracking_branch + '..') description = 'Marking set of ebuilds as stable\n\n%s' % description merge_branch_name = 'merge_branch' | def _PushChange(): """Pushes changes to the git repository. Pushes locals commits from calls to CommitChange to the remote git repository specified by os.pwd. Raises: OSError: Error occurred while pushing. """ # TODO(sosa) - Add logic for buildbot to check whether other slaves have # completed and push this change o... | 91a5215c0bcd9a908d3f9fd5ff02866afa0d1fe2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/91a5215c0bcd9a908d3f9fd5ff02866afa0d1fe2/cros_mark_as_stable.py |
_RunCommand('git rebase %s' % gflags.FLAGS.tracking_branch) _RunCommand('git cl push %s' % gflags.FLAGS.push_options) | _RunCommand('git checkout -b %s %s' % ( merge_branch_name, gflags.FLAGS.tracking_branch)) try: _RunCommand('git merge --squash %s' % _STABLE_BRANCH_NAME) _RunCommand('git commit -m "%s"' % description) _RunCommand('git config push.default tracking') _RunCommand('git push') finally: _RunCommand('git checkout %s' % _STA... | def _PushChange(): """Pushes changes to the git repository. Pushes locals commits from calls to CommitChange to the remote git repository specified by os.pwd. Raises: OSError: Error occurred while pushing. """ # TODO(sosa) - Add logic for buildbot to check whether other slaves have # completed and push this change o... | 91a5215c0bcd9a908d3f9fd5ff02866afa0d1fe2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/91a5215c0bcd9a908d3f9fd5ff02866afa0d1fe2/cros_mark_as_stable.py |
mock_file = ['EAPI=2', 'EGIT_COMMIT=old_id', 'KEYWORDS=\"~x86 ~arm\"', 'src_unpack(){}'] | mock_file = ['EAPI=2', 'CROS_WORKON_COMMIT=old_id', 'KEYWORDS=\"~x86 ~arm\"', 'src_unpack(){}'] | def testRevEBuild(self): self.mox.StubOutWithMock(cros_mark_as_stable.fileinput, 'input') self.mox.StubOutWithMock(cros_mark_as_stable.shutil, 'copyfile') m_file = self.mox.CreateMock(file) | 204f44d55754fe9ebe19be28cceac58c9fe75fc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/204f44d55754fe9ebe19be28cceac58c9fe75fc2/cros_mark_as_stable_unittest.py |
m_file.write('EGIT_COMMIT="my_id"') | m_file.write('CROS_WORKON_COMMIT="my_id"') | def testRevEBuild(self): self.mox.StubOutWithMock(cros_mark_as_stable.fileinput, 'input') self.mox.StubOutWithMock(cros_mark_as_stable.shutil, 'copyfile') m_file = self.mox.CreateMock(file) | 204f44d55754fe9ebe19be28cceac58c9fe75fc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/204f44d55754fe9ebe19be28cceac58c9fe75fc2/cros_mark_as_stable_unittest.py |
_SimpleRunCommand('git remote update') | _SimpleRunCommand('repo sync .') | def PushChange(stable_branch, tracking_branch): """Pushes commits in the stable_branch to the remote git repository. Pushes locals commits from calls to CommitChange to the remote git repository specified by current working directory. Args: stable_branch: The local branch with commits we want to push. tracking_branch... | e516dae95019bc8ab1609fcbbe5bd30ae10167d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/e516dae95019bc8ab1609fcbbe5bd30ae10167d0/cros_mark_as_stable.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.