From c729928a9cdaaf85daad826b9122a80af88f1108 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Wed, 19 Aug 2020 17:21:18 +0100
Subject: [PATCH] containers: Add an optional test for a /usr-merged sysroot

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 tests/containers.py | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/tests/containers.py b/tests/containers.py
index 77a5c7600..9e1721e06 100755
--- a/tests/containers.py
+++ b/tests/containers.py
@@ -25,6 +25,8 @@ ideally contains at least:
     The Platform merged-/usr from the SteamLinuxRuntime depot
 * scout_sysroot, soldier_sysroot:
     An SDK sysroot like the one recommended for the Docker container
+* scout_sysroot_usrmerge:
+    The same, but /usr-merged
 
 and run (for example) 'meson test -v -C _build' as usual.
 
@@ -906,6 +908,27 @@ class TestContainers(BaseTest):
         with self.subTest('transient'):
             self._test_scout('scout_sysroot', scout, locales=True)
 
+    def test_scout_sysroot_usrmerge(self) -> None:
+        scout = os.path.join(self.containers_dir, 'scout_sysroot_usrmerge')
+
+        if os.path.isdir(os.path.join(scout, 'files')):
+            scout = os.path.join(scout, 'files')
+
+        with self.subTest('only-prepare'):
+            self._test_scout(
+                'scout_sysroot_prep_usrmerge', scout,
+                copy=True, only_prepare=True,
+            )
+
+        with self.subTest('copy'):
+            self._test_scout(
+                'scout_sysroot_copy_usrmerge', scout,
+                copy=True, gc=False,
+            )
+
+        with self.subTest('transient'):
+            self._test_scout('scout_sysroot_usrmerge', scout, locales=True)
+
     def test_scout_usr(self) -> None:
         scout = os.path.join(self.containers_dir, 'scout', 'files')
 
-- 
GitLab