diff --git a/snapcraft/extensions/qt_framework.py b/snapcraft/extensions/qt_framework.py index 3810737e30..a501bfdf66 100644 --- a/snapcraft/extensions/qt_framework.py +++ b/snapcraft/extensions/qt_framework.py @@ -215,24 +215,17 @@ def get_part_snippet(self, *, plugin_name: str) -> Dict[str, Any]: @overrides def get_parts_snippet(self) -> Dict[str, Any]: - source = get_extensions_data_dir() / "desktop" / "command-chain" sdk_snap = self.qt_snaps.sdk["snap"] sdk_channel = self.qt_snaps.sdk["channel"] if self.qt_snaps.builtin: - return { - f"{self.name}/sdk": { - "source": str(source), - "plugin": "make", - "make-parameters": ["PLATFORM_PLUG=qt-framework"], - "build-snaps": [f"{sdk_snap}/{sdk_channel}"], - }, - } + return None return { f"{self.name}/sdk": { - "source": str(source), - "plugin": "make", - "make-parameters": ["PLATFORM_PLUG=qt-framework"], + "plugin": "nil", + "build-snaps": [ + f"{sdk_snap}/{sdk_channel}", + ] }, } diff --git a/tests/unit/extensions/test_qt_framework.py b/tests/unit/extensions/test_qt_framework.py index c1e97bef4e..f31a05e272 100644 --- a/tests/unit/extensions/test_qt_framework.py +++ b/tests/unit/extensions/test_qt_framework.py @@ -249,41 +249,27 @@ def test_get_part_snippet(qt_framework_extension): } -@pytest.mark.parametrize(fixture_variables, builtin_stable_values) +@pytest.mark.parametrize(fixture_variables, base_values) def test_get_parts_snippet(qt_framework_extension, name): - source = get_extensions_data_dir() / "desktop" / "command-chain" + sdk_snap = qt_framework_extension.qt_snaps.sdk["snap"] + sdk_channel = qt_framework_extension.qt_snaps.sdk["channel"] + assert qt_framework_extension.get_parts_snippet() == { - f"{name}/sdk": { - "source": str(source), - "plugin": "make", - "make-parameters": ["PLATFORM_PLUG=qt-framework"], - } + f"{name}/sdk": { + "plugin": "nil", + "stage-snaps": [f"{sdk_snap}/{sdk_channel}"] + } } @pytest.mark.parametrize(fixture_variables, builtin_stable_values) def test_get_parts_snippet_with_external_sdk(qt_framework_extension, name): - source = get_extensions_data_dir() / "desktop" / "command-chain" - - assert qt_framework_extension.get_parts_snippet() == { - f"{name}/sdk": { - "source": str(source), - "plugin": "make", - "make-parameters": ["PLATFORM_PLUG=qt-framework"], - } - } + assert qt_framework_extension.get_parts_snippet() == None @pytest.mark.parametrize(fixture_variables, builtin_edge_values) def test_get_parts_snippet_with_external_sdk_different_channel( qt_framework_extension, name ): - source = get_extensions_data_dir() / "desktop" / "command-chain" - assert qt_framework_extension.get_parts_snippet() == { - f"{name}/sdk": { - "source": str(source), - "plugin": "make", - "make-parameters": ["PLATFORM_PLUG=qt-framework"], - } - } + assert qt_framework_extension.get_parts_snippet() == None