| Summary: | buildgalculator.GalculatorTest tries to download galculator-2.1.4.tar.bz2 despite it being present in DL_DIR | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [QA/Testing] Runtime Testing | Reporter: | Joshua Lock <joshuagloe> | ||||
| Component: | general | Assignee: | Joshua Lock <joshuagloe> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium | CC: | anibal.limon, benjamin.esquivel, mariano.lopez | ||||
| Version: | 2.3 | ||||||
| Target Milestone: | 2.4 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||
| Attachments: |
|
||||||
|
Description
Joshua Lock
2017-03-29 12:30:40 UTC
I just tried this on the autobuilder with:
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py
index fc8879c..b1b78ae 100644
--- a/meta/lib/oeqa/utils/buildproject.py
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -25,9 +25,11 @@ class BuildProject(metaclass=ABCMeta):
# Download self.archive to self.localarchive
def _download_archive(self):
if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)):
+ print("here 1")
shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive)
return
+ print("here 2")
cmd = "wget -O %s %s" % (self.localarchive, self.uri)
subprocess.check_output(cmd, shell=True)
and it clearly prints "here 1" so the code path is executing.
The problem is the /tmp/ prefix which it copies the file to, we need to use a path within workdir or a proper temp directory.
GalculatorTest creates a project object which is an instance of SDKBuildProject with the first, testpath, parameter set to self.tc.sdk_dir + "/galculator/". When the super oeqa.utils.BuildProject constructor is called it's passed testpath to its named tmpdir parameter, and it's here that the _download_archive() method tries to copy or fetch the tarball to. (In reply to comment #2) > GalculatorTest creates a project object which is an instance of > SDKBuildProject with the first, testpath, parameter set to self.tc.sdk_dir + > "/galculator/". > > When the super oeqa.utils.BuildProject constructor is called it's passed > testpath to its named tmpdir parameter, and it's here that the > _download_archive() method tries to copy or fetch the tarball to. I am stupid and was looking at meta/lib/oeqa/sdk/buildgalculator.py not meta/lib/oeqa/runtime/cases/buildgalculator.py. I've submitted some patches to remove the hard-coding of /tmp: http://lists.openembedded.org/pipermail/openembedded-core/2017-April/135194.html https://patchwork.openembedded.org/series/6163/# |