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