diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-09-14 08:57:44 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-13 21:59:55 +0100 |
commit | 92a08ae838119e938922f95c14d0fcfece65a69a (patch) | |
tree | 15ddea06515baffc0fbda472e3dce1656ce50ab6 /meta/lib/oeqa/selftest/cases/devtool.py | |
parent | 082dcd01632b1e0c1b3080d377972882b37b0834 (diff) | |
download | poky-92a08ae838119e938922f95c14d0fcfece65a69a.tar.gz |
oe-selftest: devtool: fix test_devtool_add hanging on some machines
The code in scriptutils which implements the logic for running the
editor used by devtool edit-recipe looks at the VISUAL environment
variable before EDITOR, and thus if VISUAL is set in the environment it
will override the EDITOR value we are setting here, the editor (usually
vim) launches and there's nothing to stop it running forever short of
manually killing it. Set VISUAL instead to fix this.
Apparently VISUAL is in fact the variable we should really be preferring
here - I don't think I knew that but somehow I got it right in the code,
just not in the test. Here are the details for the curious:
https://unix.stackexchange.com/questions/4859/visual-vs-editor-whats-the-difference
Fixes [YOCTO #12074].
(From OE-Core rev: 6a7c50def569b5e86aa17bd9b287e8c63781dcb0)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/devtool.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/devtool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index d5d09186f7..1dfef599e6 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py | |||
@@ -216,7 +216,7 @@ class DevtoolTests(DevtoolBase): | |||
216 | result = runCmd('devtool -q find-recipe %s' % pn) | 216 | result = runCmd('devtool -q find-recipe %s' % pn) |
217 | self.assertEqual(recipepath, result.output.strip()) | 217 | self.assertEqual(recipepath, result.output.strip()) |
218 | # Test devtool edit-recipe | 218 | # Test devtool edit-recipe |
219 | result = runCmd('EDITOR="echo 123" devtool -q edit-recipe %s' % pn) | 219 | result = runCmd('VISUAL="echo 123" devtool -q edit-recipe %s' % pn) |
220 | self.assertEqual('123 %s' % recipepath, result.output.strip()) | 220 | self.assertEqual('123 %s' % recipepath, result.output.strip()) |
221 | # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then) | 221 | # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then) |
222 | bitbake('%s -c cleansstate' % pn) | 222 | bitbake('%s -c cleansstate' % pn) |