7 def compare_file(file1, file2):
8 return subprocess.call(["cmp", file1, file2])
11 class TestRootfsOverlay(infra.basetest.BRTest):
13 rootfs_overlay_path = infra.filepath("tests/core/rootfs-overlay")
15 config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
16 infra.basetest.MINIMAL_CONFIG + \
18 BR2_ROOTFS_OVERLAY="{0}1 {0}2"
19 """.format(rootfs_overlay_path)
22 target_file = os.path.join(self.builddir, "target", "test-file1")
23 overlay_file = "{}1/test-file1".format(self.rootfs_overlay_path)
24 ret = compare_file(overlay_file, target_file)
25 self.assertEqual(ret, 0)
27 target_file = os.path.join(self.builddir, "target", "etc", "test-file2")
28 overlay_file = "{}2/etc/test-file2".format(self.rootfs_overlay_path)
29 ret = compare_file(overlay_file, target_file)
30 self.assertEqual(ret, 0)