bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def RepoSync(buildroot, rw_checkout, retries=_DEFAULT_RETRIES): while retries > 0: try: RunCommand(['repo', 'sync'], cwd=buildroot) if rw_checkout: # Always re-run in case of new git repos or repo sync # failed in a previous run because of a forced Stop Build. RunCommand(['repo', 'forall', '-c', 'git', 'config', 'url.s...
def RepoSync(buildroot, rw_checkout, retries=_DEFAULT_RETRIES): while retries > 0: try: RunCommand(['repo', 'sync'], cwd=buildroot) if rw_checkout: # Always re-run in case of new git repos or repo sync # failed in a previous run because of a forced Stop Build. RunCommand(['repo', 'forall', '-c', 'git', 'config', 'url.s...
466,100
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...
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...
466,101
def _Clean(): """Cleans up uncommitted changes on either stabilizing branch or master.""" if _CheckOnStabilizingBranch(): _RunCommand('git reset HEAD --hard') _RunCommand('git checkout master') _RunCommand('git reset HEAD --hard')
def _Clean(): """Cleans up uncommitted changes on either stabilizing branch or master.""" _RunCommand('git reset HEAD --hard')
466,102
def Delete(self): """Deletes the branch and returns the user to the master branch.
def Delete(self): """Deletes the branch and returns the user to the master branch.
466,103
def RemoteUpload(files, pool=10): """Upload to google storage. Create a pool of process and call _GsUpload with the proper arguments. Args: files: dictionary with keys to local files and values to remote path. pool: integer of maximum proesses to have at the same time. Returns: Return a list of tuple arguments of th...
def RemoteUpload(files, pool=10): """Upload to google storage. Create a pool of process and call _GsUpload with the proper arguments. Args: files: dictionary with keys to local files and values to remote path. pool: integer of maximum proesses to have at the same time. Returns: Return a set of tuple arguments of the...
466,104
def RemoteUpload(files, pool=10): """Upload to google storage. Create a pool of process and call _GsUpload with the proper arguments. Args: files: dictionary with keys to local files and values to remote path. pool: integer of maximum proesses to have at the same time. Returns: Return a list of tuple arguments of th...
def RemoteUpload(files, pool=10): """Upload to google storage. Create a pool of process and call _GsUpload with the proper arguments. Args: files: dictionary with keys to local files and values to remote path. pool: integer of maximum proesses to have at the same time. Returns: Return a list of tuple arguments of th...
466,105
def UploadPrebuilt(build_path, bucket, board=None, git_file=None): """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. git_file: I...
def UploadPrebuilt(build_path, bucket, board=None, git_file=None): """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. git_file: I...
466,106
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitPushWithRetry(retries=5): """Repo sync and then push git changes in flight. Args: retries: The number of times to retry before giving up, default: 5 Raises: GitPushFailed if push was unsuccessful after retries """ for retry in range(retries+1): try: cros_build_lib.RunCommand('repo sync .', shell=True) cros_...
466,107
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already value: string representing the version of the prebuilt that has been uploaded. retries: The number of times to retry before giving up, default: 5 """ prebuilt_branch = 'prebuilt_branch' old_cw...
466,108
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
466,109
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
466,110
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if this is None upload...
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False, git_sync_retries=5): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if...
466,111
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if this is None upload...
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if this is None upload...
466,112
def __init__(self, tests, results_dir_root=None): """Constructs and initializes the test runner class.
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.
466,113
def _SpawnTests(self): """Spawns VMs and starts the test runs on them.
def _SpawnTests(self): """Spawns VMs and starts the test runs on them.
466,114
def main(): usage = 'Usage: %prog [options] tests...' parser = optparse.OptionParser(usage=usage) parser.add_option('--results_dir_root', help='Root results directory.') (options, args) = parser.parse_args() if not args: parser.print_help() Die('no tests provided') runner = ParallelTestRunner(args, options.results_di...
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]'...
466,115
def main(): usage = 'Usage: %prog [options] tests...' parser = optparse.OptionParser(usage=usage) parser.add_option('--results_dir_root', help='Root results directory.') (options, args) = parser.parse_args() if not args: parser.print_help() Die('no tests provided') runner = ParallelTestRunner(args, options.results_di...
def main(): usage = 'Usage: %prog [options] tests...' parser = optparse.OptionParser(usage=usage) parser.add_option('--results_dir_root', help='Root results directory.') (options, args) = parser.parse_args() if not args: parser.print_help() Die('no tests provided') runner = ParallelTestRunner(args, options.base_ssh_p...
466,116
def main(): parser = optparse.OptionParser() parser.add_option('-r', '--buildroot', help='root directory where sync occurs') parser.add_option('-c', '--clobber', action='store_true', default=False, help='clobber build directory and do a full checkout') (options, args) = parser.parse_args() if options.buildroot: if opti...
def main(): parser = optparse.OptionParser() parser.add_option('-r', '--buildroot', help='root directory where sync occurs') parser.add_option('-c', '--clobber', action='store_true', default=False, help='clobber build directory and do a full checkout') (options, args) = parser.parse_args() if options.buildroot: if opti...
466,117
def main(): parser = optparse.OptionParser() parser.add_option('-r', '--buildroot', help='root directory where sync occurs') parser.add_option('-c', '--clobber', action='store_true', default=False, help='clobber build directory and do a full checkout') (options, args) = parser.parse_args() if options.buildroot: if opti...
def main(): parser = optparse.OptionParser() parser.add_option('-r', '--buildroot', help='root directory where sync occurs') parser.add_option('-c', '--clobber', action='store_true', default=False, help='clobber build directory and do a full checkout') (options, args) = parser.parse_args() if options.buildroot: if opti...
466,118
def CreateTempDir(): """Creates a tempdir and returns the name of the tempdir.""" temp_dir = tempfile.mkdtemp(suffix='au', prefix='tmp') logging.info('Using tempdir = %s', temp_dir) return temp_dir
def CreateTempDir(): """Creates a tempdir and returns the name of the tempdir.""" temp_dir = tempfile.mkdtemp(suffix='au', prefix='tmp') logging.debug('Using tempdir = %s', temp_dir) return temp_dir
466,119
def DepsToCopy(ldd_files, black_list): """Returns a list of deps for a given dynamic executables list. Args: ldd_files: List of dynamic files that needs to have the deps evaluated black_list: List of files that we should ignore Returns: library_list: List of files that are dependencies """ for file_name in ldd_files: l...
def DepsToCopy(ldd_files, black_list): """Returns a list of deps for a given dynamic executables list. Args: ldd_files: List of dynamic files that needs to have the deps evaluated black_list: List of files that we should ignore Returns: library_list: List of files that are dependencies """ for file_name in ldd_files: l...
466,120
def CopyRequiredFiles(dest_files_root): """Generates a list of files that are required for au-generator zip file Args: dest_files_root: location of the directory where we should copy the files """ if not dest_files_root: logging.error('Invalid option passed for dest_files_root') sys.exit(1) # Files that need to go thro...
def CopyRequiredFiles(dest_files_root): """Generates a list of files that are required for au-generator zip file Args: dest_files_root: location of the directory where we should copy the files """ if not dest_files_root: logging.error('Invalid option passed for dest_files_root') sys.exit(1) # Files that need to go thro...
466,121
def CopyRequiredFiles(dest_files_root): """Generates a list of files that are required for au-generator zip file Args: dest_files_root: location of the directory where we should copy the files """ if not dest_files_root: logging.error('Invalid option passed for dest_files_root') sys.exit(1) # Files that need to go thro...
def CopyRequiredFiles(dest_files_root): """Generates a list of files that are required for au-generator zip file Args: dest_files_root: location of the directory where we should copy the files """ if not dest_files_root: logging.error('Invalid option passed for dest_files_root') sys.exit(1) # Files that need to go thro...
466,122
def CopyRequiredFiles(dest_files_root): """Generates a list of files that are required for au-generator zip file Args: dest_files_root: location of the directory where we should copy the files """ if not dest_files_root: logging.error('Invalid option passed for dest_files_root') sys.exit(1) # Files that need to go thro...
def CopyRequiredFiles(dest_files_root): """Generates a list of files that are required for au-generator zip file Args: dest_files_root: location of the directory where we should copy the files """ if not dest_files_root: logging.error('Invalid option passed for dest_files_root') sys.exit(1) # Files that need to go thro...
466,123
def CleanUp(temp_dir): """Cleans up the tempdir Args: temp_dir = name of the directory to cleanup """ if os.path.exists(temp_dir): shutil.rmtree(temp_dir, ignore_errors=True) logging.info('Removed tempdir = %s', temp_dir)
def CleanUp(temp_dir): """Cleans up the tempdir Args: temp_dir = name of the directory to cleanup """ if os.path.exists(temp_dir): shutil.rmtree(temp_dir, ignore_errors=True) logging.debug('Removed tempdir = %s', temp_dir)
466,124
def GenerateZipFile(base_name, root_dir): """Returns true if able to generate zip file Args: base_name: name of the zip file root_dir: location of the directory that we should zip Returns: True if successfully generates the zip file otherwise False """ logging.info('Generating zip file %s with contents from %s', base_n...
def GenerateZipFile(base_name, root_dir): """Returns true if able to generate zip file Args: base_name: name of the zip file root_dir: location of the directory that we should zip Returns: True if successfully generates the zip file otherwise False """ logging.debug('Generating zip file %s with contents from %s', base_...
466,125
def CopyZipToFinalDestination(output_dir, zip_file_name): """Copies the generated zip file to a final destination Args: output_dir: Directory where the file should be copied to zip_file_name: name of the zip file that should be copied Returns: True on Success False on Failure """ if not os.path.isfile(zip_file_name): l...
def CopyZipToFinalDestination(output_dir, zip_file_name): """Copies the generated zip file to a final destination Args: output_dir: Directory where the file should be copied to zip_file_name: name of the zip file that should be copied Returns: True on Success False on Failure """ if not os.path.isfile(zip_file_name): l...
466,126
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. """ while retries > 0: try: RunCommand(['repo', 'sync'], cwd=...
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. """ while retries > 0: try: RunCommand(['repo', 'sync', '--jo...
466,127
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
466,128
def _Build(buildroot, emptytree): """Wrapper around build_packages.""" cwd = os.path.join(buildroot, 'src', 'scripts') if emptytree: cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree ./build_packages'] else: cmd = ['./build_packages'] RunCommand(cmd, cwd=cwd, enter_chroot=True)
def _Build(buildroot, emptytree): """Wrapper around build_packages.""" cwd = os.path.join(buildroot, 'src', 'scripts') if emptytree: cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree ./build_packages'] else: cmd = ['./build_packages'] RunCommand(cmd, cwd=cwd, enter_chroot=True)
466,129
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...
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...
466,130
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitPushWithRetry(retries=5): """Repo sync and then push git changes in flight. Args: retries: The number of times to retry before giving up, default: 5 Raises: GitPushFailed if push was unsuccessful after retries """ for retry in range(1, retries+1): try: cros_build_lib.RunCommand('repo sync .', shell=True) cr...
466,131
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already value: string representing the version of the prebuilt that has been uploaded. retries: The number of times to retry before giving up, default: 5 """ prebuilt_branch = 'prebuilt_branch' old_cw...
466,132
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
466,133
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
def RevGitFile(filename, value): """Update and push the git file. Args: filename: file to modify that is in a git repo already key: board or host package type e.g. x86-dogfood value: string representing the version of the prebuilt that has been uploaded. """ prebuilt_branch = 'prebuilt_branch' old_cwd = os.getcwd() os...
466,134
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if this is None upload...
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False, git_sync_retries=5): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if...
466,135
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if this is None upload...
def UploadPrebuilt(build_path, upload_location, version, binhost_base_url, board=None, git_sync=False): """Upload Host prebuilt files to Google Storage space. Args: build_path: The path to the root of the chroot. upload_location: The upload location. board: The board to upload to Google Storage, if this is None upload...
466,136
def GetLatestLinkFromPage(url, regex): """Returns the latest link from the given url that matches regex. Args: url: Url to download and parse. regex: Regular expression to match links against. """ url_file = urllib.urlopen(url) url_html = url_file.read() url_file.close() # Parses links with versions embedded. url_par...
def GetLatestLinkFromPage(url, regex): """Returns the latest link from the given url that matches regex. Args: url: Url to download and parse. regex: Regular expression to match links against. """ url_file = urllib.urlopen(url) url_html = url_file.read() url_file.close() # Parses links with versions embedded. url_par...
466,137
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
def _PopulateDuplicateDB(self, db): """Populate db with SHA1 -> URL mapping for packages.
466,138
def SetUploadLocation(self, base_uri, path_prefix): """Set upload location to base_uri + path_prefix.
def SetUploadLocation(self, base_uri, path_prefix): """Set upload location to base_uri + path_prefix.
466,139
def GrabRemotePackageIndex(binhost_url): """Grab the latest binary package database from the specified URL. Args: binhost_url: Base URL of remote packages (PORTAGE_BINHOST). Returns: A PackageIndex object, if the Packages file can be retrieved. If the server returns status code 404, None is returned. """ url = urlpa...
def GrabRemotePackageIndex(binhost_url): """Grab the latest binary package database from the specified URL. Args: binhost_url: Base URL of remote packages (PORTAGE_BINHOST). Returns: A PackageIndex object, if the Packages file can be retrieved. If the server returns status code 404, None is returned. """ url = '%s/P...
466,140
def _ArchiveTestResults(buildroot, board, archive_dir, test_results_dir): """Archives the test results into the www dir for later use. Takes the results from the test_results_dir and dumps them into the archive dir specified. This also archives the last qemu image. board: Board to find the qemu image. archive_dir: ...
def _ArchiveTestResults(buildroot, board, archive_dir, test_results_dir): """Archives the test results into the www dir for later use. Takes the results from the test_results_dir and dumps them into the archive dir specified. This also archives the last qemu image. board: Board to find the qemu image. archive_dir: ...
466,141
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False, shell=False): """Runs a command. Args: cmd: cmd to run. Should be input to subprocess.Popen. print_cmd: prints the command before running it....
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None, exit_code=False, redirect_stdout=False, redirect_stderr=False, cwd=None, input=None, enter_chroot=False, shell=False): """Runs a command. Args: cmd: cmd to run. Should be input to subprocess.Popen. print_cmd: prints the command before running it....
466,142
def testFindEBuildPath(self): self.mox.StubOutWithMock(cros_mark_as_stable, '_SimpleRunCommand') cros_mark_as_stable._SimpleRunCommand( 'equery-x86-generic which %s 2> /dev/null' % self.package).AndReturn( self.ebuild_path) self.mox.ReplayAll() path = cros_mark_as_stable._EBuild._FindEBuildPath(self.package) self.mox.V...
def testFindEBuildPath(self): self.mox.StubOutWithMock(cros_mark_as_stable, '_SimpleRunCommand') cmd = ('ACCEPT_KEYWORDS="x86 arm amd64" ' 'equery-x86-generic which %s 2> /dev/null') cros_mark_as_stable._SimpleRunCommand(cmd % self.package).AndReturn( self.ebuild_path) self.mox.ReplayAll() path = cros_mark_as_stable._E...
466,143
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
def testGetLatestZipUrl(self): """Test case that tests GetLatestZipUrl with test urls.""" self.mox.StubOutWithMock(urllib, 'urlopen') m_file = self.mox.CreateMock(file) The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with t...
466,144
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. urllib.urlopen('%s/%s/LATEST-%s' % (self.latestbase, self.channel, self.board)).AndReturn(m_file) m_file.read().AndReturn('%s.bin.gz' % self.image_name) m_file.close() Args: download_fold...
466,145
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. self.mox.ReplayAl...
466,146
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
466,147
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
466,148
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
466,149
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
def ModifyBootDesc(download_folder, redirect_file=None): """Modifies the boot description of a downloaded image to work with path. The default boot.desc from another system is specific to the directory it was created in. This modifies the boot description to be compatiable with the download folder. Args: download_fo...
466,150
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. """ # Grab the l...
def testGrabZipAndExtractImageWrongCache(self): """Test case where download_url exists but doesn't match our url.""" self.mox.StubOutWithMock(os.path, 'exists') self.mox.StubOutWithMock(os, 'mkdir') self.mox.StubOutWithMock(__builtins__, 'open') self.mox.StubOutWithMock(ctest, 'RunCommand') self.mox.StubOutWithMock(url...
466,151
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. """ # Grab the l...
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. """ # Grab the l...
466,152
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. """ # Grab the l...
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. """ # Grab the l...
466,153
def GrabZipAndExtractImage(zip_url, download_folder, image_name) : """Downloads the zip and extracts the given image. Doesn't re-download if matching version found already in download folder. Args: zip_url - url for the image. download_folder - download folder to store zip file and extracted images. image_name - name ...
os.path.exists('%s/%s' % ( self.download_folder, ctest._IMAGE_TO_EXTRACT)).AndReturn(False) Doesn't re-download if matching version found already in download folder. Args: zip_url - url for the image. download_folder - download folder to store zip file and extracted images. image_name - name of the image to extract fr...
466,154
def GrabZipAndExtractImage(zip_url, download_folder, image_name) : """Downloads the zip and extracts the given image. Doesn't re-download if matching version found already in download folder. Args: zip_url - url for the image. download_folder - download folder to store zip file and extracted images. image_name - name ...
def GrabZipAndExtractImage(zip_url, download_folder, image_name) : """Downloads the zip and extracts the given image. Doesn't re-download if matching version found already in download folder. Args: zip_url - url for the image. download_folder - download folder to store zip file and extracted images. image_name - name ...
466,155
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...
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...
466,156
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
466,157
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
466,158
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
466,159
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
466,160
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
466,161
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
466,162
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
466,163
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
466,164
def _SetupBoard(buildroot, board='x86-generic'): """Wrapper around setup_board.""" cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./setup_board', '--fast', '--default', '--board=%s' % board], cwd=cwd)
def _SetupBoard(buildroot, board='x86-generic'): """Wrapper around setup_board.""" cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./setup_board', '--fast', '--default', '--board=%s' % board], cwd=cwd, enter_chroot=True)
466,165
def _BuildImage(buildroot): cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./build_image'], cwd=cwd)
def _BuildImage(buildroot): cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./build_image'], cwd=cwd, enter_chroot=True)
466,166
def _RunUnitTests(buildroot): cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./cros_run_unit_tests'], cwd=cwd)
def _RunUnitTests(buildroot): cwd = os.path.join(buildroot, 'src', 'scripts') RunCommand(['./cros_run_unit_tests'], cwd=cwd, enter_chroot=True)
466,167
def RepoSync(buildroot, rw_checkout, retries=_DEFAULT_RETRIES): while retries > 0: try: RunCommand(['repo', 'sync'], cwd=buildroot) if rw_checkout: # Always re-run in case of new git repos or repo sync # failed in a previous run because of a forced Stop Build. RunCommand(['repo', 'forall', '-c', 'git', 'config', 'url.s...
def RepoSync(buildroot, rw_checkout, retries=_DEFAULT_RETRIES): while retries > 0: try: RunCommand(['repo', 'sync'], cwd=buildroot) if rw_checkout: # Always re-run in case of new git repos or repo sync # failed in a previous run because of a forced Stop Build. RunCommand(['repo', 'forall', '-c', 'git', 'config', 'url.s...
466,168
def RepoSync(buildroot, rw_checkout, retries=_DEFAULT_RETRIES): while retries > 0: try: RunCommand(['repo', 'sync'], cwd=buildroot) if rw_checkout: # Always re-run in case of new git repos or repo sync # failed in a previous run because of a forced Stop Build. RunCommand(['repo', 'forall', '-c', 'git', 'config', 'url.s...
def RepoSync(buildroot, rw_checkout, retries=_DEFAULT_RETRIES): while retries > 0: try: RunCommand(['repo', 'sync'], cwd=buildroot) if rw_checkout: # Always re-run in case of new git repos or repo sync # failed in a previous run because of a forced Stop Build. RunCommand(['repo', 'forall', '-c', 'git', 'config', 'url.s...
466,169
def _UprevPackages(buildroot, revisionfile): revisions = None if (revisionfile): rev_file = revisionfile.open(revisionfile) revisions = rev_file.read() rev_file.close() # Note: Revisions == "None" indicates a Force Build. if revisions and revisions != 'None': print 'CBUILDBOT - Revision list found %s' % revisions pri...
def _UprevPackages(buildroot, revisionfile): revisions = None if (revisionfile): try: rev_file = open(revisionfile) revisions = rev_file.read() rev_file.close() except: print >> sys.stderr, 'Error reading %s' % revisionfile revisions = None # Note: Revisions == "None" indicates a Force Build. if revisions and revisio...
466,170
def LoadFilterFile(filter_file): """Load a file with keywords on a per line basis. Args: filter_file: file to load into FILTER_PACKAGES """ filter_fh = open(filter_file) try: FILTER_PACKAGES.update([filter.strip() for filter in filter_fh]) finally: filter_fh.close() return FILTER_PACKAGES
def LoadFilterFile(filter_file): """Load a file with keywords on a per line basis. Args: filter_file: file to load into _FILTER_PACKAGES """ filter_fh = open(filter_file) try: FILTER_PACKAGES.update([filter.strip() for filter in filter_fh]) finally: filter_fh.close() return FILTER_PACKAGES
466,171
def LoadFilterFile(filter_file): """Load a file with keywords on a per line basis. Args: filter_file: file to load into FILTER_PACKAGES """ filter_fh = open(filter_file) try: FILTER_PACKAGES.update([filter.strip() for filter in filter_fh]) finally: filter_fh.close() return FILTER_PACKAGES
def LoadFilterFile(filter_file): """Load a file with keywords on a per line basis. Args: filter_file: file to load into FILTER_PACKAGES """ filter_fh = open(filter_file) try: _FILTER_PACKAGES.update([filter.strip() for filter in filter_fh]) finally: filter_fh.close() return FILTER_PACKAGES
466,172
def LoadFilterFile(filter_file): """Load a file with keywords on a per line basis. Args: filter_file: file to load into FILTER_PACKAGES """ filter_fh = open(filter_file) try: FILTER_PACKAGES.update([filter.strip() for filter in filter_fh]) finally: filter_fh.close() return FILTER_PACKAGES
def LoadFilterFile(filter_file): """Load a file with keywords on a per line basis. Args: filter_file: file to load into FILTER_PACKAGES """ filter_fh = open(filter_file) try: FILTER_PACKAGES.update([filter.strip() for filter in filter_fh]) finally: filter_fh.close() return _FILTER_PACKAGES
466,173
def ShouldFilterPackage(file_path): """Skip a particular file if it matches a pattern. Skip any files that machine the list of packages to filter in FILTER_PACKAGES. Args: file_path: string of a file path to inspect against FILTER_PACKAGES Returns: True if we should filter the package, False otherwise. """ for name ...
def ShouldFilterPackage(file_path): """Skip a particular file if it matches a pattern. Skip any files that machine the list of packages to filter in _FILTER_PACKAGES. Args: file_path: string of a file path to inspect against _FILTER_PACKAGES Returns: True if we should filter the package, False otherwise. """ for nam...
466,174
def ShouldFilterPackage(file_path): """Skip a particular file if it matches a pattern. Skip any files that machine the list of packages to filter in FILTER_PACKAGES. Args: file_path: string of a file path to inspect against FILTER_PACKAGES Returns: True if we should filter the package, False otherwise. """ for name ...
def ShouldFilterPackage(file_path): """Skip a particular file if it matches a pattern. Skip any files that machine the list of packages to filter in FILTER_PACKAGES. Args: file_path: string of a file path to inspect against FILTER_PACKAGES Returns: True if we should filter the package, False otherwise. """ for name ...
466,175
def RemoteUpload(files, pool=10): """Upload to google storage. Create a pool of process and call _GsUpload with the proper arguments. Args: files: dictionary with keys to local files and values to remote path. pool: integer of maximum proesses to have at the same time. """ # TODO(scottz) port this to use _RunManyPara...
def RemoteUpload(files, pool=10): """Upload to google storage. Create a pool of process and call _GsUpload with the proper arguments. Args: files: dictionary with keys to local files and values to remote path. pool: integer of maximum proesses to have at the same time. """ # TODO(scottz) port this to use _RunManyPara...
466,176
def UploadPrebuilt(build_path, bucket, board=None, git_file=None): """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. git_file: I...
def UploadPrebuilt(build_path, bucket, board=None, git_file=None): """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. git_file: I...
466,177
def usage(parser, msg): """Display usage message and parser help then exit with 1.""" print msg parser.print_help() sys.exit(1)
def usage(parser, msg): """Display usage message and parser help then exit with 1.""" print >> sys.stderr, msg parser.print_help() sys.exit(1)
466,178
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. """ while retries > 0: try: # The --trace option ensures that...
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. """ while retries > 0: try: # The --trace option ensures that...
466,179
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('...
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('...
466,180
def ResolveOverlays(overlays): """Return the list of overlays to use for a given buildbot. Args: overlays: A string describing which overlays you want. 'private': Just the private overlay. 'public': Just the public overlay. 'both': Both the public and private overlays. """ public_overlay = '%s/src/third_party/chromium...
def ResolveOverlays(buildroot, overlays): """Return the list of overlays to use for a given buildbot. Args: overlays: A string describing which overlays you want. 'private': Just the private overlay. 'public': Just the public overlay. 'both': Both the public and private overlays. """ public_overlay = '%s/src/third_par...
466,181
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('...
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('...
466,182
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)
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=False)
466,183
def UpdateLocalFile(filename, value, key='PORTAGE_BINHOST'): """Update the key in file with the value passed. File format: key="value" Note quotes are added automatically Args: filename: Name of file to modify. value: Value to write with the key. key: The variable key to update. (Default: PORTAGE_BINHOST) """ file_fh ...
def UpdateLocalFile(filename, value, key='PORTAGE_BINHOST'): """Update the key in file with the value passed. File format: key="value" Note quotes are added automatically Args: filename: Name of file to modify. value: Value to write with the key. key: The variable key to update. (Default: PORTAGE_BINHOST) """ file_fh ...
466,184
def TryDeltaAndFallbackToFull(self, src_image, image, stateful_change='old'): """Tries the delta update first if set and falls back to full update.""" if self.use_delta_updates: try: self.source_image = src_image self.UpdateImage(image) except: Warning('Delta update failed, disabling delta updates and retrying.') self....
def TryDeltaAndFallbackToFull(self, src_image, image, stateful_change='old'): """Tries the delta update first if set and falls back to full update.""" if self.use_delta_updates: try: self.source_image = src_image self._UpdateImageReportError(image) except: Warning('Delta update failed, disabling delta updates and retry...
466,185
def TryDeltaAndFallbackToFull(self, src_image, image, stateful_change='old'): """Tries the delta update first if set and falls back to full update.""" if self.use_delta_updates: try: self.source_image = src_image self.UpdateImage(image) except: Warning('Delta update failed, disabling delta updates and retrying.') self....
def TryDeltaAndFallbackToFull(self, src_image, image, stateful_change='old'): """Tries the delta update first if set and falls back to full update.""" if self.use_delta_updates: try: self.source_image = src_image self.UpdateImage(image) except: Warning('Delta update failed, disabling delta updates and retrying.') self....
466,186
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
def testFullUpdateKeepStateful(self): """Tests if we can update normally.
466,187
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
def testFullUpdateWipeStateful(self): """Tests if we can update after cleaning the stateful partition.
466,188
def PrepareBase(self): """Auto-update to base image to prepare for test.""" self.UpdateImage(base_image_path)
def PrepareBase(self, image_path): """Auto-update to base image to prepare for test.""" self.UpdateImage(base_image_path)
466,189
def PrepareBase(self): """Auto-update to base image to prepare for test.""" self.UpdateImage(base_image_path)
def PrepareBase(self): """Auto-update to base image to prepare for test.""" self.UpdateImage(base_image_path)
466,190
def UpdateImage(self, image_path, stateful_change='old'): """Updates a remote image using image_to_live.sh.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change)
def UpdateImage(self, image_path, stateful_change='old'): """Updates a remote image using image_to_live.sh.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change)
466,191
def UpdateImage(self, image_path, stateful_change='old'): """Updates a remote image using image_to_live.sh.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change)
def UpdateImage(self, image_path, stateful_change='old'): """Updates a remote image using image_to_live.sh.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change)
466,192
def PrepareBase(self): """Creates an update-able VM based on base image.""" self.vm_image_path = '%s/chromiumos_qemu_image.bin' % os.path.dirname( base_image_path)
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( base_image_path)
466,193
def PrepareBase(self): """Creates an update-able VM based on base image.""" 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.""" self.vm_image_path = '%s/chromiumos_qemu_image.bin' % os.path.dirname( base_image_path)
466,194
def PrepareBase(self): """Creates an update-able VM based on base image.""" 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.""" self.vm_image_path = '%s/chromiumos_qemu_image.bin' % os.path.dirname( base_image_path)
466,195
def UpdateImage(self, image_path, stateful_change='old'): """Updates VM image with image_path.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change) if self.source_image == base_image_path: self.source_image = self.vm_image_path
def UpdateImage(self, image_path, stateful_change='old'): """Updates VM image with image_path.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change) if self.source_image == base_image_path: self.source_image = self.vm_image_path
466,196
def _SimpleRunCommand(command): """Runs a shell command and returns stdout back to caller.""" _Print(' + %s' % command) proc_handle = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) stdout = proc_handle.communicate()[0] retcode = proc_handle.wait() if retcode != 0: raise subprocess.CalledProcessError(ret...
def _SimpleRunCommand(command): """Runs a shell command and returns stdout back to caller.""" _Print(' + %s' % command) proc_handle = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True) stdout = proc_handle.communicate()[0] retcode = proc_handle.wait() if retcode != 0: _Print(stdout) raise subprocess.CalledP...
466,197
def _UprevFromRevisionList(buildroot, revision_list): """Uprevs based on revision list.""" if not revision_list: Info('No packages found to uprev') return package_str = '' for package, revision in revision_list: package_str += package + ' ' package_str = package_str.strip() cwd = os.path.join(buildroot, 'src', 'scri...
def _UprevFromRevisionList(buildroot, tracking_branch, revision_list): """Uprevs based on revision list.""" if not revision_list: Info('No packages found to uprev') return package_str = '' for package, revision in revision_list: package_str += package + ' ' package_str = package_str.strip() cwd = os.path.join(buildr...
466,198
def _UprevFromRevisionList(buildroot, revision_list): """Uprevs based on revision list.""" if not revision_list: Info('No packages found to uprev') return package_str = '' for package, revision in revision_list: package_str += package + ' ' package_str = package_str.strip() cwd = os.path.join(buildroot, 'src', 'scri...
def _UprevFromRevisionList(buildroot, revision_list): """Uprevs based on revision list.""" if not revision_list: Info('No packages found to uprev') return package_str = '' for package, revision in revision_list: package_str += package + ' ' package_str = package_str.strip() cwd = os.path.join(buildroot, 'src', 'scri...
466,199