diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/wic.py | 12 | ||||
| -rwxr-xr-x | scripts/wic | 3 |
2 files changed, 7 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py index e45594fdc8..77f1bdcfa9 100644 --- a/meta/lib/oeqa/selftest/wic.py +++ b/meta/lib/oeqa/selftest/wic.py | |||
| @@ -210,12 +210,12 @@ class Wic(oeSelfTest): | |||
| 210 | def test_build_artifacts(self): | 210 | def test_build_artifacts(self): |
| 211 | """Test wic create directdisk providing all artifacts.""" | 211 | """Test wic create directdisk providing all artifacts.""" |
| 212 | bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) | 212 | bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) |
| 213 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', | 213 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS')) |
| 214 | 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS')) | 214 | bbvars['recipe_sysroot_native'] = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') |
| 215 | status = runCmd("wic create directdisk " | 215 | status = runCmd("wic create directdisk " |
| 216 | "-b %(staging_datadir)s " | 216 | "-b %(staging_datadir)s " |
| 217 | "-k %(deploy_dir_image)s " | 217 | "-k %(deploy_dir_image)s " |
| 218 | "-n %(staging_dir_native)s " | 218 | "-n %(recipe_sysroot_native)s " |
| 219 | "-r %(image_rootfs)s" % bbvars).status | 219 | "-r %(image_rootfs)s" % bbvars).status |
| 220 | self.assertEqual(0, status) | 220 | self.assertEqual(0, status) |
| 221 | self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) | 221 | self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) |
| @@ -301,13 +301,13 @@ class Wic(oeSelfTest): | |||
| 301 | def test_rootfs_artifacts(self): | 301 | def test_rootfs_artifacts(self): |
| 302 | """Test usage of rootfs plugin with rootfs paths""" | 302 | """Test usage of rootfs plugin with rootfs paths""" |
| 303 | bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) | 303 | bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) |
| 304 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', | 304 | for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE', 'IMAGE_ROOTFS')) |
| 305 | 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS')) | 305 | bbvars['recipe_sysroot_native'] = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') |
| 306 | bbvars['wks'] = "directdisk-multi-rootfs" | 306 | bbvars['wks'] = "directdisk-multi-rootfs" |
| 307 | status = runCmd("wic create %(wks)s " | 307 | status = runCmd("wic create %(wks)s " |
| 308 | "--bootimg-dir=%(staging_datadir)s " | 308 | "--bootimg-dir=%(staging_datadir)s " |
| 309 | "--kernel-dir=%(deploy_dir_image)s " | 309 | "--kernel-dir=%(deploy_dir_image)s " |
| 310 | "--native-sysroot=%(staging_dir_native)s " | 310 | "--native-sysroot=%(recipe_sysroot_native)s " |
| 311 | "--rootfs-dir rootfs1=%(image_rootfs)s " | 311 | "--rootfs-dir rootfs1=%(image_rootfs)s " |
| 312 | "--rootfs-dir rootfs2=%(image_rootfs)s" | 312 | "--rootfs-dir rootfs2=%(image_rootfs)s" |
| 313 | % bbvars).status | 313 | % bbvars).status |
diff --git a/scripts/wic b/scripts/wic index 1ad16665e7..f09dbc2e00 100755 --- a/scripts/wic +++ b/scripts/wic | |||
| @@ -175,8 +175,7 @@ def wic_create_subcommand(args, usage_str): | |||
| 175 | 175 | ||
| 176 | rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name) | 176 | rootfs_dir = get_bitbake_var("IMAGE_ROOTFS", options.image_name) |
| 177 | kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name) | 177 | kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE", options.image_name) |
| 178 | native_sysroot = get_bitbake_var("STAGING_DIR_NATIVE", | 178 | native_sysroot = os.path.join(get_bitbake_var("RECIPE_SYSROOT_NATIVE", "wic-tools")) |
| 179 | options.image_name) | ||
| 180 | else: | 179 | else: |
| 181 | if options.build_rootfs: | 180 | if options.build_rootfs: |
| 182 | print("Image name is not specified, exiting. (Use -e/--image-name to specify it)\n") | 181 | print("Image name is not specified, exiting. (Use -e/--image-name to specify it)\n") |
