[FabricSync] Add MCORE_FS_1_2 and MCORE_FS_1_5 to CI (#35716)

* [FabricSync] Add MCORE_FS_1_2 and MCORE_FS_1_5 to CI

Fixes #35481

* Remove exception
diff --git a/src/python_testing/TC_MCORE_FS_1_2.py b/src/python_testing/TC_MCORE_FS_1_2.py
index 3c155e9..7be1bf9 100644
--- a/src/python_testing/TC_MCORE_FS_1_2.py
+++ b/src/python_testing/TC_MCORE_FS_1_2.py
@@ -15,10 +15,20 @@
 #    limitations under the License.
 #
 
-# TODO: add to CI. See https://github.com/project-chip/connectedhomeip/issues/34676
+# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments
 # for details about the block below.
 #
+# === BEGIN CI TEST ARGUMENTS ===
+# test-runner-runs: run1
+# test-runner-run/run1/app: examples/fabric-admin/scripts/fabric-sync-app.py
+# test-runner-run/run1/app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234
+# test-runner-run/run1/factoryreset: true
+# test-runner-run/run1/script-args: --PICS src/app/tests/suites/certification/ci-pics-values --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
+# test-runner-run/run1/script-start-delay: 5
+# test-runner-run/run1/quiet: false
+# === END CI TEST ARGUMENTS ===
 
+import asyncio
 import hashlib
 import logging
 import os
@@ -78,7 +88,13 @@
         self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__)
         logging.info("Temporary storage directory: %s", self.storage.name)
 
+        # Get the named pipe path for the DUT_FSA app input from the user params.
+        dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe", None)
+        if dut_fsa_stdin_pipe is not None:
+            self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w")
+
         self.th_server_port = th_server_port
+        # These are default testing values.
         self.th_server_setup_params = _SetupParameters(
             setup_qr_code="MT:-24J0AFN00KA0648G00",
             manual_code=34970112332,
@@ -160,7 +176,14 @@
         asserts.assert_true(type_matches(step_1_dut_parts_list, list), "PartsList is expected to be a list")
 
         self.step(2)
-        self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params)
+        if not self.is_ci:
+            self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params)
+        else:
+            self.dut_fsa_stdin.write(
+                f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n")
+            self.dut_fsa_stdin.flush()
+            # Wait for the commissioning to complete.
+            await asyncio.sleep(5)
 
         self.step(3)
         report_waiting_timeout_delay_sec = 30
diff --git a/src/python_testing/TC_MCORE_FS_1_5.py b/src/python_testing/TC_MCORE_FS_1_5.py
index 2373f66..4a395f7 100755
--- a/src/python_testing/TC_MCORE_FS_1_5.py
+++ b/src/python_testing/TC_MCORE_FS_1_5.py
@@ -15,8 +15,20 @@
 #    limitations under the License.
 #
 
-# TODO: add to CI. See https://github.com/project-chip/connectedhomeip/issues/34676
+# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments
+# for details about the block below.
+#
+# === BEGIN CI TEST ARGUMENTS ===
+# test-runner-runs: run1
+# test-runner-run/run1/app: examples/fabric-admin/scripts/fabric-sync-app.py
+# test-runner-run/run1/app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234
+# test-runner-run/run1/factoryreset: true
+# test-runner-run/run1/script-args: --PICS src/app/tests/suites/certification/ci-pics-values --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --string-arg th_server_app_path:${ALL_CLUSTERS_APP} dut_fsa_stdin_pipe:dut-fsa-stdin --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
+# test-runner-run/run1/script-start-delay: 5
+# test-runner-run/run1/quiet: false
+# === END CI TEST ARGUMENTS ===
 
+import asyncio
 import hashlib
 import logging
 import os
@@ -77,8 +89,13 @@
         self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__)
         logging.info("Temporary storage directory: %s", self.storage.name)
 
+        # Get the named pipe path for the DUT_FSA app input from the user params.
+        dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe", None)
+        if dut_fsa_stdin_pipe is not None:
+            self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w")
+
         self.th_server_port = th_server_port
-        # These are default testing values
+        # These are default testing values.
         self.th_server_setup_params = _SetupParameters(
             setup_qr_code="MT:-24J0AFN00KA0648G00",
             manual_code=34970112332,
@@ -166,7 +183,14 @@
         asserts.assert_true(type_matches(step_1_dut_parts_list, list), "PartsList is expected to be a list")
 
         self.step(2)
-        self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params)
+        if not self.is_ci:
+            self._ask_for_vendor_commissioning_ux_operation(self.th_server_setup_params)
+        else:
+            self.dut_fsa_stdin.write(
+                f"pairing onnetwork 2 {self.th_server_setup_params.passcode}\n")
+            self.dut_fsa_stdin.flush()
+            # Wait for the commissioning to complete.
+            await asyncio.sleep(5)
 
         self.step(3)
         report_waiting_timeout_delay_sec = 30
diff --git a/src/python_testing/execute_python_tests.py b/src/python_testing/execute_python_tests.py
index f03e31b..9e19aa1 100644
--- a/src/python_testing/execute_python_tests.py
+++ b/src/python_testing/execute_python_tests.py
@@ -69,8 +69,6 @@
         "TC_OpstateCommon.py",  # Shared code for TC_OPSTATE, not a standalone test
         "TC_pics_checker.py",  # Currently isn't enabled because we don't have any examples with conformant PICS
         "TC_TMP_2_1.py",  # src/python_testing/test_testing/test_TC_TMP_2_1.py is the Unit test of this test
-        "TC_MCORE_FS_1_2.py",  # This test requires a TH_SERVER application, hence not ready run with CI
-        "TC_MCORE_FS_1_5.py",  # This test requires a TH_SERVER application, hence not ready run with CI
         "TC_OCC_3_1.py",  # There are CI issues for the test cases that implements manually controlling sensor device for the occupancy state ON/OFF change
         "TC_OCC_3_2.py",  # There are CI issues for the test cases that implements manually controlling sensor device for the occupancy state ON/OFF change
         "TC_BRBINFO_4_1.py",  # This test requires a TH_ICD_SERVER application, hence not ready run with CI