diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/wic.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 0c03b4b02d..3c5be2f501 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py | |||
@@ -866,6 +866,13 @@ class Wic2(WicTestCase): | |||
866 | self.assertEqual(8, len(result.output.split('\n'))) | 866 | self.assertEqual(8, len(result.output.split('\n'))) |
867 | self.assertTrue(os.path.basename(testdir) in result.output) | 867 | self.assertTrue(os.path.basename(testdir) in result.output) |
868 | 868 | ||
869 | # copy the file from the partition and check if it success | ||
870 | dest = '%s-cp' % testfile.name | ||
871 | runCmd("wic cp %s:1/%s %s -n %s" % (images[0], | ||
872 | os.path.basename(testfile.name), dest, sysroot)) | ||
873 | self.assertTrue(os.path.exists(dest)) | ||
874 | |||
875 | |||
869 | def test_wic_rm(self): | 876 | def test_wic_rm(self): |
870 | """Test removing files and directories from the the wic image.""" | 877 | """Test removing files and directories from the the wic image.""" |
871 | runCmd("wic create mkefidisk " | 878 | runCmd("wic create mkefidisk " |
@@ -1005,6 +1012,16 @@ class Wic2(WicTestCase): | |||
1005 | newdirs = set(line.split()[-1] for line in result.output.split('\n') if line) | 1012 | newdirs = set(line.split()[-1] for line in result.output.split('\n') if line) |
1006 | self.assertEqual(newdirs.difference(dirs), set([os.path.basename(testfile.name)])) | 1013 | self.assertEqual(newdirs.difference(dirs), set([os.path.basename(testfile.name)])) |
1007 | 1014 | ||
1015 | # check if the file to copy is in the partition | ||
1016 | result = runCmd("wic ls %s:2/etc/ -n %s" % (images[0], sysroot)) | ||
1017 | self.assertTrue('fstab' in [line.split()[-1] for line in result.output.split('\n') if line]) | ||
1018 | |||
1019 | # copy file from the partition, replace the temporary file content with it and | ||
1020 | # check for the file size to validate the copy | ||
1021 | runCmd("wic cp %s:2/etc/fstab %s -n %s" % (images[0], testfile.name, sysroot)) | ||
1022 | self.assertTrue(os.stat(testfile.name).st_size > 0) | ||
1023 | |||
1024 | |||
1008 | def test_wic_rm_ext(self): | 1025 | def test_wic_rm_ext(self): |
1009 | """Test removing files from the ext partition.""" | 1026 | """Test removing files from the ext partition.""" |
1010 | runCmd("wic create mkefidisk " | 1027 | runCmd("wic create mkefidisk " |