diff mbox series

[v2,08/13] support/testing/tests/package/test_flutter.py: use flutter-markdown-example

Message ID 20240325223424.108702-8-adam.duskett@amarulasolutions.com
State Accepted
Headers show
Series [v2,01/13] package/flutter-packages/flutter-markdown-example: new package | expand

Commit Message

Adam Duskett March 25, 2024, 10:34 p.m. UTC
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>
---
 support/testing/tests/package/test_flutter.py         |  5 +++--
 .../multi-user.target.wants/flutter-gallery.service   |  1 -
 .../flutter-markdown-example.service                  |  1 +
 .../usr/lib/systemd/system/flutter-gallery.service    | 11 -----------
 .../systemd/system/flutter-markdown-example.service   | 11 +++++++++++
 5 files changed, 15 insertions(+), 14 deletions(-)
 delete mode 120000 support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
 create mode 120000 support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-markdown-example.service
 delete mode 100644 support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
 create mode 100644 support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-markdown-example.service
diff mbox series

Patch

diff --git a/support/testing/tests/package/test_flutter.py b/support/testing/tests/package/test_flutter.py
index a3e98a43e5..3a150a69e1 100644
--- a/support/testing/tests/package/test_flutter.py
+++ b/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_RAW_KEYBOARD_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_TARGET_ROOTFS_EXT2=y
         BR2_TARGET_ROOTFS_EXT2_4=y
@@ -48,7 +49,7 @@  class TestFlutter(infra.basetest.BRTest):
                      "-vnc", "none",
                      "-drive", f"file={img},if=virtio,format=raw"])
         self.emulator.login()
-        cmd = "systemctl is-active flutter-gallery"
+        cmd = "systemctl is-active flutter-markdown-example"
         output, exit_code = self.emulator.run(cmd, 10)
         self.assertEqual(exit_code, 0)
         self.assertEqual(output[0], "active")
diff --git a/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
deleted file mode 120000
index 40993fb16c..0000000000
--- a/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
+++ /dev/null
@@ -1 +0,0 @@ 
-../../../../usr/lib/systemd/system/flutter-gallery.service
\ No newline at end of file
diff --git a/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-markdown-example.service b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-markdown-example.service
new file mode 120000
index 0000000000..83e731ba2d
--- /dev/null
+++ b/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
\ No newline at end of file
diff --git a/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
deleted file mode 100644
index 88a2bcbf0b..0000000000
--- a/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
+++ /dev/null
@@ -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
diff --git a/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-markdown-example.service b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-markdown-example.service
new file mode 100644
index 0000000000..2a64b88c2d
--- /dev/null
+++ b/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