Browse Source

support/testing/tests/package/test_flutter.py: use flutter-markdown-example

The maintainers of the flutter-gallery package archived the project as of
February 16, 2024. In addition, the flutter-gallery package is incompatible
with Flutter 3.19.x. Because of these problems, using the flutter-gallery
package as the testing application for Flutter is no longer reasonable nor
maintainable.

However, it is reasonable to use the flutter-markdown-example package from
flutter-packages, as it is a first-party application updated regularly and
often automatically, ensuring compatibility with the latest versions of
Flutter.

  - Switch the package used for Flutter testing from flutter-gallery to
    flutter-markdown-example

  - Rename flutter-gallery.service to flutter-markdown-example.service

  - Change /usr/share/flutter/gallery/release/ to
    /usr/share/flutter/flutter_markdown_example/release/

  - Run `systemctl is-active flutter-markdown-example` instead of
   `systemctl is-active flutter-gallery`

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
Adam Duskett 1 year ago
parent
commit
a92e7c3cec

+ 3 - 2
support/testing/tests/package/test_flutter.py

@@ -25,7 +25,8 @@ class TestFlutter(infra.basetest.BRTest):
         BR2_PACKAGE_FLUTTER_PI=y
         BR2_PACKAGE_FLUTTER_PI=y
         BR2_PACKAGE_FLUTTER_PI_RAW_KEYBOARD_PLUGIN=y
         BR2_PACKAGE_FLUTTER_PI_RAW_KEYBOARD_PLUGIN=y
         BR2_PACKAGE_FLUTTER_PI_TEXT_INPUT_PLUGIN=y
         BR2_PACKAGE_FLUTTER_PI_TEXT_INPUT_PLUGIN=y
-        BR2_PACKAGE_FLUTTER_GALLERY=y
+        BR2_PACKAGE_FLUTTER_PACKAGES=y
+        BR2_PACKAGE_FLUTTER_MARKDOWN_EXAMPLE=y
         BR2_PACKAGE_FLUTTER_ENGINE=y
         BR2_PACKAGE_FLUTTER_ENGINE=y
         BR2_TARGET_ROOTFS_EXT2=y
         BR2_TARGET_ROOTFS_EXT2=y
         BR2_TARGET_ROOTFS_EXT2_4=y
         BR2_TARGET_ROOTFS_EXT2_4=y
@@ -48,7 +49,7 @@ class TestFlutter(infra.basetest.BRTest):
                      "-vnc", "none",
                      "-vnc", "none",
                      "-drive", f"file={img},if=virtio,format=raw"])
                      "-drive", f"file={img},if=virtio,format=raw"])
         self.emulator.login()
         self.emulator.login()
-        cmd = "systemctl is-active flutter-gallery"
+        cmd = "systemctl is-active flutter-markdown-example"
         output, exit_code = self.emulator.run(cmd, 10)
         output, exit_code = self.emulator.run(cmd, 10)
         self.assertEqual(exit_code, 0)
         self.assertEqual(exit_code, 0)
         self.assertEqual(output[0], "active")
         self.assertEqual(output[0], "active")

+ 0 - 1
support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service

@@ -1 +0,0 @@
-../../../../usr/lib/systemd/system/flutter-gallery.service

+ 1 - 0
support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-markdown-example.service

@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/flutter-markdown-example.service

+ 0 - 11
support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service

@@ -1,11 +0,0 @@
-[Unit]
-Description=flutter-gallery daemon
-After=dbus.service systemd-udevd.service
-
-[Service]
-ExecStart=/usr/bin/flutter-pi --release /usr/share/flutter/gallery/release/
-Restart=always
-KillMode=process
-
-[Install]
-WantedBy=multi-user.target

+ 11 - 0
support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-markdown-example.service

@@ -0,0 +1,11 @@
+[Unit]
+Description=flutter-markdown-example daemon
+After=dbus.service systemd-udevd.service
+
+[Service]
+ExecStart=/usr/bin/flutter-pi --release /usr/share/flutter/flutter_markdown_example/release/
+Restart=always
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target