diff options
-rw-r--r-- | meta/lib/oeqa/runtime/utils/targetbuildproject.py | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/meta/lib/oeqa/runtime/utils/targetbuildproject.py b/meta/lib/oeqa/runtime/utils/targetbuildproject.py index 006d4d4a7b..1ed5789ae5 100644 --- a/meta/lib/oeqa/runtime/utils/targetbuildproject.py +++ b/meta/lib/oeqa/runtime/utils/targetbuildproject.py | |||
@@ -14,20 +14,23 @@ class TargetBuildProject(BuildProject): | |||
14 | def download_archive(self): | 14 | def download_archive(self): |
15 | self._download_archive() | 15 | self._download_archive() |
16 | 16 | ||
17 | (status, output) = self.target.copy_to(self.localarchive, self.targetdir) | 17 | status, output = self.target.copyTo(self.localarchive, self.targetdir) |
18 | if status != 0: | 18 | if status: |
19 | raise Exception("Failed to copy archive to target, output: %s" % output) | 19 | raise Exception('Failed to copy archive to target, ' |
20 | 20 | 'output: %s' % output) | |
21 | (status, output) = self.target.run('tar xf %s%s -C %s' % (self.targetdir, self.archive, self.targetdir)) | 21 | |
22 | if status != 0: | 22 | cmd = 'tar xf %s%s -C %s' % (self.targetdir, |
23 | raise Exception("Failed to extract archive, output: %s" % output) | 23 | self.archive, |
24 | 24 | self.targetdir) | |
25 | #Change targetdir to project folder | 25 | status, output = self.target.run(cmd) |
26 | if status: | ||
27 | raise Exception('Failed to extract archive, ' | ||
28 | 'output: %s' % output) | ||
29 | |||
30 | # Change targetdir to project folder | ||
26 | self.targetdir = self.targetdir + self.fname | 31 | self.targetdir = self.targetdir + self.fname |
27 | 32 | ||
28 | # The timeout parameter of target.run is set to 0 to make the ssh command | 33 | # The timeout parameter of target.run is set to 0 |
29 | # run with no timeout. | 34 | # to make the ssh command run with no timeout. |
30 | def _run(self, cmd): | 35 | def _run(self, cmd): |
31 | return self.target.run(cmd, 0)[0] | 36 | return self.target.run(cmd, 0)[0] |
32 | |||
33 | |||