* [PATCH 0/2] selftest: fix to not hardcode 'tmp' for TMPDIR
@ 2017-01-09 7:09 Chen Qi
2017-01-09 7:09 ` [PATCH 1/2] selftest/bbtests.py: do " Chen Qi
2017-01-09 7:09 ` [PATCH 2/2] selftest/buildoptions.py: " Chen Qi
0 siblings, 2 replies; 6+ messages in thread
From: Chen Qi @ 2017-01-09 7:09 UTC (permalink / raw)
To: openembedded-core
The following changes since commit e016eb10b075e280b4e78a04e47b59a173386421:
bitbake: bb/cooker: BBCooker stops notifier at shutdown (2017-01-06 00:01:07 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/selftest-tmp_dir
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/selftest-tmp_dir
Chen Qi (2):
selftest/bbtests.py: do not hardcode 'tmp' for TMPDIR
selftest/buildoptions.py: do not hardcode 'tmp' for TMPDIR
meta/lib/oeqa/selftest/bbtests.py | 5 +++--
meta/lib/oeqa/selftest/buildoptions.py | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] selftest/bbtests.py: do not hardcode 'tmp' for TMPDIR
2017-01-09 7:09 [PATCH 0/2] selftest: fix to not hardcode 'tmp' for TMPDIR Chen Qi
@ 2017-01-09 7:09 ` Chen Qi
2017-01-09 10:35 ` Burton, Ross
2017-01-09 7:09 ` [PATCH 2/2] selftest/buildoptions.py: " Chen Qi
1 sibling, 1 reply; 6+ messages in thread
From: Chen Qi @ 2017-01-09 7:09 UTC (permalink / raw)
To: openembedded-core
Use the value of TMPDIR instead of hardcoding 'tmp'.
In fact, in OE, we have:
TCLIBCAPPEND ?= "-${TCLIBC}"
TMPDIR .= "${TCLIBCAPPEND}"
So the TMPDIR defaults to have ${TCLIBC} in it.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/lib/oeqa/selftest/bbtests.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 08cc401..cd36dd8 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -235,8 +235,9 @@ INHERIT_remove = \"report-error\"
self.addCleanup(ftools.remove_from_file, conf ,data)
result = bitbake('readline', ignore_status=True)
self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
- self.assertFalse(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv3')))
- self.assertTrue(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv2')))
+ tmp_dir = get_bb_var('TMPDIR')
+ self.assertFalse(os.path.isfile(os.path.join(tmp_dir, 'deploy/licenses/readline/generic_GPLv3')))
+ self.assertTrue(os.path.isfile(os.path.join(tmp_dir, 'deploy/licenses/readline/generic_GPLv2')))
@testcase(1422)
def test_setscene_only(self):
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] selftest/buildoptions.py: do not hardcode 'tmp' for TMPDIR
2017-01-09 7:09 [PATCH 0/2] selftest: fix to not hardcode 'tmp' for TMPDIR Chen Qi
2017-01-09 7:09 ` [PATCH 1/2] selftest/bbtests.py: do " Chen Qi
@ 2017-01-09 7:09 ` Chen Qi
2017-01-09 10:35 ` Burton, Ross
1 sibling, 1 reply; 6+ messages in thread
From: Chen Qi @ 2017-01-09 7:09 UTC (permalink / raw)
To: openembedded-core
Use the value of TMPDIR instead of hardcoding 'tmp'.
In fact, in OE, we have:
TCLIBCAPPEND ?= "-${TCLIBC}"
TMPDIR .= "${TCLIBCAPPEND}"
So the TMPDIR defaults to have ${TCLIBC} in it.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/lib/oeqa/selftest/buildoptions.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/buildoptions.py b/meta/lib/oeqa/selftest/buildoptions.py
index 25d14f7..c736dba 100644
--- a/meta/lib/oeqa/selftest/buildoptions.py
+++ b/meta/lib/oeqa/selftest/buildoptions.py
@@ -197,7 +197,8 @@ class ArchiverTest(oeSelfTest):
self.write_config("INHERIT += \"archiver\"\nARCHIVER_MODE[src] = \"original\"\nARCHIVER_MODE[srpm] = \"1\"")
res = bitbake("xcursor-transparent-theme", ignore_status=True)
self.assertEqual(res.status, 0, "\nCouldn't build xcursortransparenttheme.\nbitbake output %s" % res.output)
- pkgs_path = g.glob(str(self.builddir) + "/tmp/deploy/sources/allarch*/xcurs*")
+ tmp_dir = get_bb_var('TMPDIR')
+ pkgs_path = g.glob(str(tmp_dir) + "/deploy/sources/allarch*/xcurs*")
src_file_glob = str(pkgs_path[0]) + "/xcursor*.src.rpm"
tar_file_glob = str(pkgs_path[0]) + "/xcursor*.tar.gz"
- self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under tmp/deploy/sources/allarch*/xcursor*")
+ self.assertTrue((g.glob(src_file_glob) and g.glob(tar_file_glob)), "Couldn't find .src.rpm and .tar.gz files under %s/deploy/sources/allarch*/xcursor*" % tmp_dir)
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] selftest/bbtests.py: do not hardcode 'tmp' for TMPDIR
2017-01-09 7:09 ` [PATCH 1/2] selftest/bbtests.py: do " Chen Qi
@ 2017-01-09 10:35 ` Burton, Ross
0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2017-01-09 10:35 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On 9 January 2017 at 07:09, Chen Qi <Qi.Chen@windriver.com> wrote:
> + tmp_dir = get_bb_var('TMPDIR')
> + self.assertFalse(os.path.isfile(os.path.join(tmp_dir,
> 'deploy/licenses/readline/generic_GPLv3')))
> + self.assertTrue(os.path.isfile(os.path.join(tmp_dir,
> 'deploy/licenses/readline/generic_GPLv2')))
>
If we're going to remove path assumptions, then LICENSE_DIRECTORY is
$DEPLOY_DIR/licenses.
Ross
[-- Attachment #2: Type: text/html, Size: 994 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] selftest/buildoptions.py: do not hardcode 'tmp' for TMPDIR
2017-01-09 7:09 ` [PATCH 2/2] selftest/buildoptions.py: " Chen Qi
@ 2017-01-09 10:35 ` Burton, Ross
2017-01-10 2:24 ` ChenQi
0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-01-09 10:35 UTC (permalink / raw)
To: Chen Qi; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 342 bytes --]
On 9 January 2017 at 07:09, Chen Qi <Qi.Chen@windriver.com> wrote:
> - pkgs_path = g.glob(str(self.builddir) +
> "/tmp/deploy/sources/allarch*/xcurs*")
> + tmp_dir = get_bb_var('TMPDIR')
> + pkgs_path = g.glob(str(tmp_dir) + "/deploy/sources/allarch*/
> xcurs*")
>
I think you meant DEPLOY_DIR_SRC :)
Ross
[-- Attachment #2: Type: text/html, Size: 882 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] selftest/buildoptions.py: do not hardcode 'tmp' for TMPDIR
2017-01-09 10:35 ` Burton, Ross
@ 2017-01-10 2:24 ` ChenQi
0 siblings, 0 replies; 6+ messages in thread
From: ChenQi @ 2017-01-10 2:24 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
On 01/09/2017 06:35 PM, Burton, Ross wrote:
>
> On 9 January 2017 at 07:09, Chen Qi <Qi.Chen@windriver.com
> <mailto:Qi.Chen@windriver.com>> wrote:
>
> - pkgs_path = g.glob(str(self.builddir) +
> "/tmp/deploy/sources/allarch*/xcurs*")
> + tmp_dir = get_bb_var('TMPDIR')
> + pkgs_path = g.glob(str(tmp_dir) +
> "/deploy/sources/allarch*/xcurs*")
>
>
> I think you meant DEPLOY_DIR_SRC :)
>
> Ross
Thanks.
I've sent out a new patchset. The title is "[PATCH 0/2] selftest: fix
path assumption".
And the remote branch is also changed to:
git://git.pokylinux.org/poky-contrib ChenQi/selftest-path-assumption
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/selftest-path-assumption
Best Regards,
Chen Qi
[-- Attachment #2: Type: text/html, Size: 2266 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-10 2:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 7:09 [PATCH 0/2] selftest: fix to not hardcode 'tmp' for TMPDIR Chen Qi
2017-01-09 7:09 ` [PATCH 1/2] selftest/bbtests.py: do " Chen Qi
2017-01-09 10:35 ` Burton, Ross
2017-01-09 7:09 ` [PATCH 2/2] selftest/buildoptions.py: " Chen Qi
2017-01-09 10:35 ` Burton, Ross
2017-01-10 2:24 ` ChenQi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox