From patchwork Tue Jul 2 18:55:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Baker X-Patchwork-Id: 18248 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CEDE62391D for ; Tue, 2 Jul 2013 18:55:22 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id b12sf9264615yha.0 for ; Tue, 02 Jul 2013 11:55:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state:x-original-sender :x-original-authentication-results:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=7+oF6WmVsXtiLNqWHt4eGXJbJg5HzQ6pU3mQNao280U=; b=IZqFJHiw/6mcMUbsMynQ50S44WflRvw/Ez2YiQAQjb2JjwBGdZriCi+uIGGMnt3R9M jKVsyGG/LJM6XQ/TqkpAFHi6k2lieVLww4TisycSgVIbqWEob92AOp1owIcDDeCkRJmp 7zMK0+dakpcYRuWCT5ACs0pe2m1kD0FFz0GQlUgO33lehgSnrUFJflmfKQutgZx3f5Er HZdJLtudtYyfvwmOIH9VLFRTHloN1+c6f3zGlBEeErDQvPvpJSiae406LYu+yyTADY1R 4NSZIQ1vi7UV8Wo8qoenOUtP5F0KALLVDKOSbHHpvAM9/fxRko7bDDxYT7zC2Vonex7+ hgJw== X-Received: by 10.236.156.234 with SMTP id m70mr17307366yhk.37.1372791322432; Tue, 02 Jul 2013 11:55:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.122.74 with SMTP id lq10ls2821246qeb.30.gmail; Tue, 02 Jul 2013 11:55:22 -0700 (PDT) X-Received: by 10.58.216.97 with SMTP id op1mr11867194vec.60.1372791322230; Tue, 02 Jul 2013 11:55:22 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id fa1si6309153ved.51.2013.07.02.11.55.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Jul 2013 11:55:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id jw11so5194382veb.32 for ; Tue, 02 Jul 2013 11:55:22 -0700 (PDT) X-Received: by 10.58.29.228 with SMTP id n4mr11972510veh.50.1372791322145; Tue, 02 Jul 2013 11:55:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp22754veb; Tue, 2 Jul 2013 11:55:21 -0700 (PDT) X-Received: by 10.14.7.133 with SMTP id 5mr27719828eep.115.1372791320283; Tue, 02 Jul 2013 11:55:20 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id f48si14988607eet.355.2013.07.02.11.55.19 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 02 Jul 2013 11:55:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Uu5jT-0001Z5-LY for ; Tue, 02 Jul 2013 18:55:19 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 95937E012D for ; Tue, 2 Jul 2013 18:55:19 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 633 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 633: Fix for bug 1195536 Message-Id: <20130702185519.23403.29913.launchpad@ackee.canonical.com> Date: Tue, 02 Jul 2013 18:55:19 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16692"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 444a0e7151b0f3b9bd0f94860b91932ca9b38eae X-Gm-Message-State: ALoCoQkqztqTb7yeI+8iNb5SppRcjqfrZiiHhBgWtTa6930/5n74xF9fd7KOB0TqCiCpZd3LF8hx X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Merge authors: Yongqin Liu (liuyq0307) Related merge proposals: https://code.launchpad.net/~liuyq0307/lava-dispatcher/fix-1195536/+merge/171954 proposed by: Yongqin Liu (liuyq0307) review: Approve - Tyler Baker (tyler-baker) ------------------------------------------------------------ revno: 633 [merge] committer: Tyler Baker branch nick: lava-dispatcher timestamp: Tue 2013-07-02 11:54:12 -0700 message: Fix for bug 1195536 modified: lava_dispatcher/config.py lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x1-a7x1.conf lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x4-a7x4.conf lava_dispatcher/device/fastmodel.py lava_dispatcher/device/target.py --- lp:lava-dispatcher https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk You are subscribed to branch lp:lava-dispatcher. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription === modified file 'lava_dispatcher/config.py' --- lava_dispatcher/config.py 2013-06-20 15:37:54 +0000 +++ lava_dispatcher/config.py 2013-07-01 01:46:25 +0000 @@ -85,8 +85,8 @@ simulator_version_command = schema.StringOption() simulator_command = schema.StringOption() simulator_axf_files = schema.ListOption() - simulator_kernel = schema.StringOption(default=None) - simulator_initrd = schema.StringOption(default=None) + simulator_kernel_files = schema.ListOption(default=None) + simulator_initrd_files = schema.ListOption(default=None) simulator_dtb = schema.StringOption(default=None) simulator_uefi = schema.StringOption(default=None) simulator_boot_wrapper = schema.StringOption(default=None) === modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x1-a7x1.conf' --- lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x1-a7x1.conf 2013-06-19 16:22:43 +0000 +++ lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x1-a7x1.conf 2013-06-28 10:01:48 +0000 @@ -45,17 +45,23 @@ sendline 2 simulator_axf_files = - img.axf - linux-system-ISW.axf - rtsm/linux-system-semi.axf - -simulator_kernel = vmlinuz.* -simulator_initrd = initrd.* + img.axf + linux-system-ISW.axf + linux-system-semi.axf + +simulator_kernel_files = + uImage + vmlinuz.* + +simulator_initrd_files = + uInitrd + initrd.* + simulator_dtb = rtsm_ve-ca15x1-ca7x1.dtb simulator_uefi = uefi_rtsm_ve-ca15.bin license_file = 8224@localhost -sim_bin = /opt/arm/RTSM_A15-A7x14_VE/Linux64_RTSM_VE_Cortex-A15x4-A7x4/RTSM_VE_Cortex-A15x4-A7x4 +sim_bin = /opt/arm/RTSM_A15-A7x14_VE/Linux64_RTSM_VE_Cortex-A15x1-A7x1/RTSM_VE_Cortex-A15x1-A7x1 android_adb_port = 6555 simulator_version_command = %(sim_bin)s --version | grep "Fast Models" | sed 's/Fast Models \[//' | sed 's/\]//' === modified file 'lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x4-a7x4.conf' --- lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x4-a7x4.conf 2013-06-19 16:22:43 +0000 +++ lava_dispatcher/default-config/lava-dispatcher/device-types/rtsm_ve-a15x4-a7x4.conf 2013-06-28 10:01:48 +0000 @@ -45,12 +45,18 @@ sendline 2 simulator_axf_files = - img.axf - linux-system-ISW.axf - rtsm/linux-system-semi.axf - -simulator_kernel = vmlinuz.* -simulator_initrd = initrd.* + img.axf + linux-system-ISW.axf + linux-system-semi.axf + +simulator_kernel_files = + uImage + vmlinuz.* + +simulator_initrd_files = + uInitrd + initrd.* + simulator_dtb = rtsm_ve-ca15x4-ca7x4.dtb simulator_uefi = uefi_rtsm_ve-ca15.bin === modified file 'lava_dispatcher/device/fastmodel.py' --- lava_dispatcher/device/fastmodel.py 2013-06-25 10:50:02 +0000 +++ lava_dispatcher/device/fastmodel.py 2013-07-01 10:45:36 +0000 @@ -23,10 +23,8 @@ import cStringIO import logging import os -import shutil import stat import subprocess -import re import lava_dispatcher.device.boot_options as boot_options @@ -48,7 +46,6 @@ ensure_directory, extract_targz, DrainConsoleOutput, - string_to_list, ) @@ -93,24 +90,30 @@ subdir = os.path.join(mntdir, subdir) self._copy_needed_files_from_directory(subdir) + def _copy_first_find_from_list(self, subdir, odir, file_list): + f_path = None + for fname in file_list: + f_path = self._find_and_copy(subdir, odir, fname) + if f_path: + break + + return f_path + def _copy_needed_files_from_directory(self, subdir): odir = os.path.dirname(self._sd_image) if self._bootloader == 'u_boot': # Extract the bootwrapper from the image - for fname in self.config.simulator_axf_files: - if self._axf is None: - self._axf = self._find_and_copy( - subdir, odir, fname) - else: - break + if self.config.simulator_axf_files and self._axf is None: + self._axf = self._copy_first_find_from_list(subdir, odir, + self.config.simulator_axf_files) # Extract the kernel from the image - if self.config.simulator_kernel and self._kernel is None: - self._kernel = self._find_and_copy( - subdir, odir, self.config.simulator_kernel) + if self.config.simulator_kernel_files and self._kernel is None: + self._kernel = self._copy_first_find_from_list(subdir, odir, + self.config.simulator_kernel_files) # Extract the initrd from the image - if self.config.simulator_initrd and self._initrd is None: - self._initrd = self._find_and_copy( - subdir, odir, self.config.simulator_initrd) + if self.config.simulator_initrd_files and self._initrd is None: + self._initrd = self._copy_first_find_from_list(subdir, odir, + self.config.simulator_initrd_files) # Extract the dtb from the image if self.config.simulator_dtb and self._dtb is None: self._dtb = self._find_and_copy( @@ -128,13 +131,13 @@ raise RuntimeError('No AXF found, %r' % self.config.simulator_axf_files) # Kernel is needed only for b.L models - if self._kernel is None and self.config.simulator_kernel: + if self._kernel is None and self.config.simulator_kernel_files: raise RuntimeError('No KERNEL found, %r' % - self.config.simulator_kernel) + self.config.simulator_kernel_files) # Initrd is needed only for b.L models - if self._initrd is None and self.config.simulator_initrd: + if self._initrd is None and self.config.simulator_initrd_files: raise RuntimeError('No INITRD found, %r' % - self.config.simulator_initrd) + self.config.simulator_initrd_files) # DTB is needed only for b.L models if self._dtb is None and self.config.simulator_dtb: raise RuntimeError('No DTB found, %r' % === modified file 'lava_dispatcher/device/target.py' --- lava_dispatcher/device/target.py 2013-06-19 21:49:04 +0000 +++ lava_dispatcher/device/target.py 2013-06-28 02:52:46 +0000 @@ -158,14 +158,14 @@ def _find_and_copy(self, rootdir, odir, pattern, name=None): dest = None for root, dirs, files in os.walk(rootdir): - for file in files: - if re.match(pattern, file): + for file_name in files: + if re.match(pattern, file_name): if name: dest = os.path.join(odir, name) else: - dest = os.path.join(odir, file) + dest = os.path.join(odir, file_name) if rootdir != odir: - src = os.path.join(rootdir, file) + src = os.path.join(root, file_name) shutil.copyfile(src, dest) return dest else: