diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 2 | ||||
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 9f4a9db444..df2d2d225e 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -318,6 +318,7 @@ class Wic(WicTestCase): | |||
318 | "--image-name=core-image-minimal " | 318 | "--image-name=core-image-minimal " |
319 | "-D -o %s" % self.resultdir) | 319 | "-D -o %s" % self.resultdir) |
320 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) | 320 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) |
321 | self.assertEqual(1, len(glob(self.resultdir + "tmp.wic*"))) | ||
321 | 322 | ||
322 | def test_debug_long(self): | 323 | def test_debug_long(self): |
323 | """Test --debug option""" | 324 | """Test --debug option""" |
@@ -325,6 +326,7 @@ class Wic(WicTestCase): | |||
325 | "--image-name=core-image-minimal " | 326 | "--image-name=core-image-minimal " |
326 | "--debug -o %s" % self.resultdir) | 327 | "--debug -o %s" % self.resultdir) |
327 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) | 328 | self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*.direct"))) |
329 | self.assertEqual(1, len(glob(self.resultdir + "tmp.wic*"))) | ||
328 | 330 | ||
329 | def test_skip_build_check_short(self): | 331 | def test_skip_build_check_short(self): |
330 | """Test -s option""" | 332 | """Test -s option""" |
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 7e1c1c03ab..ea709e8c54 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
@@ -54,6 +54,7 @@ class DirectPlugin(ImagerPlugin): | |||
54 | self.native_sysroot = native_sysroot | 54 | self.native_sysroot = native_sysroot |
55 | self.oe_builddir = oe_builddir | 55 | self.oe_builddir = oe_builddir |
56 | 56 | ||
57 | self.debug = options.debug | ||
57 | self.outdir = options.outdir | 58 | self.outdir = options.outdir |
58 | self.compressor = options.compressor | 59 | self.compressor = options.compressor |
59 | self.bmap = options.bmap | 60 | self.bmap = options.bmap |
@@ -274,8 +275,9 @@ class DirectPlugin(ImagerPlugin): | |||
274 | if os.path.isfile(path): | 275 | if os.path.isfile(path): |
275 | shutil.move(path, os.path.join(self.outdir, fname)) | 276 | shutil.move(path, os.path.join(self.outdir, fname)) |
276 | 277 | ||
277 | # remove work directory | 278 | # remove work directory when it is not in debugging mode |
278 | shutil.rmtree(self.workdir, ignore_errors=True) | 279 | if not self.debug: |
280 | shutil.rmtree(self.workdir, ignore_errors=True) | ||
279 | 281 | ||
280 | # Overhead of the MBR partitioning scheme (just one sector) | 282 | # Overhead of the MBR partitioning scheme (just one sector) |
281 | MBR_OVERHEAD = 1 | 283 | MBR_OVERHEAD = 1 |