aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/test-remote-image
diff options
context:
space:
mode:
authorCorneliu Stoicescu <corneliux.stoicescu@intel.com>2014-07-11 19:02:46 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-16 10:15:51 +0100
commit3cc3f8a069b3d6d895afa6f192b36443b8328f40 (patch)
tree3a413c88a8fea37c3785443d164cc5d54eedf32b /scripts/test-remote-image
parent4c67bab18ba82a2e8446ff11482a234ec7e4cc35 (diff)
downloadopenembedded-core-contrib-3cc3f8a069b3d6d895afa6f192b36443b8328f40.tar.gz
scripts/test-remote-image: add --skip-download option
Adding the possibility to skip the download phase completely. This is useful for repeating runs with the same image types and similar configurations. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/test-remote-image')
-rwxr-xr-xscripts/test-remote-image27
1 files changed, 16 insertions, 11 deletions
diff --git a/scripts/test-remote-image b/scripts/test-remote-image
index 7d02a84806c..8120a6257f6 100755
--- a/scripts/test-remote-image
+++ b/scripts/test-remote-image
@@ -78,6 +78,7 @@ def get_args_parser():
parser.add_argument('--required-packages', required=False, action="store", nargs='*', dest="required_packages", default=None, help='Required packages for the tests. They will be built before the testing begins.')
parser.add_argument('--targetprofile', required=False, action="store", nargs=1, dest="targetprofile", default='AutoTargetProfile', help='The target profile to be used.')
parser.add_argument('--repoprofile', required=False, action="store", nargs=1, dest="repoprofile", default='PublicAB', help='The repo profile to be used.')
+ parser.add_argument('--skip-download', required=False, action="store_true", dest="skip_download", default=False, help='Skip downloading the images completely. This needs the correct files to be present in the directory specified by the target profile.')
return parser
class BaseTargetProfile(object):
@@ -248,13 +249,14 @@ class PublicAB(BaseRepoProfile):
class HwAuto():
- def __init__(self, image_types, repolink, required_packages, targetprofile, repoprofile):
+ def __init__(self, image_types, repolink, required_packages, targetprofile, repoprofile, skip_download):
log.info('Initializing..')
self.image_types = image_types
self.repolink = repolink
self.required_packages = required_packages
self.targetprofile = targetprofile
self.repoprofile = repoprofile
+ self.skip_download = skip_download
self.repo = self.get_repo_profile(self.repolink)
# Get the repository profile; for now we only look inside this module.
@@ -304,15 +306,18 @@ class HwAuto():
# For each image type, download the needed files and run the tests.
noissuesfound = True
for image_type in self.image_types:
- target = self.get_target_profile(image_type)
- files_dict = target.get_files_dict()
- log.info("Downloading files for %s" % image_type)
- for f in files_dict:
- if self.repo.check_old_file(files_dict[f]):
- filepath = os.path.join(self.repo.localdir, files_dict[f])
- if os.path.exists(filepath):
- os.remove(filepath)
- self.repo.fetch(files_dict[f])
+ if self.skip_download:
+ log.info("Skipping downloading the images..")
+ else:
+ target = self.get_target_profile(image_type)
+ files_dict = target.get_files_dict()
+ log.info("Downloading files for %s" % image_type)
+ for f in files_dict:
+ if self.repo.check_old_file(files_dict[f]):
+ filepath = os.path.join(self.repo.localdir, files_dict[f])
+ if os.path.exists(filepath):
+ os.remove(filepath)
+ self.repo.fetch(files_dict[f])
result = self.runTestimageBuild(image_type)
if result.status != 0:
@@ -331,7 +336,7 @@ def main():
parser = get_args_parser()
args = parser.parse_args()
- hwauto = HwAuto(image_types=args.image_types, repolink=args.repo_link, required_packages=args.required_packages, targetprofile=args.targetprofile, repoprofile=args.repoprofile)
+ hwauto = HwAuto(image_types=args.image_types, repolink=args.repo_link, required_packages=args.required_packages, targetprofile=args.targetprofile, repoprofile=args.repoprofile, skip_download=args.skip_download)
hwauto.run()