All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/1] tests/avocado: Add ast1030 test case
@ 2022-03-21  9:16 Jamin Lin
  2022-03-21  9:16 ` [PATCH v1 1/1] test/avocado/machine_aspeed.py: " Jamin Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Jamin Lin @ 2022-03-21  9:16 UTC (permalink / raw)
  To: Cleber Rosa, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Beraldo Leal,
	open list:All patches CC here
  Cc: jamin_lin, troy_lee, steven_lee

1. Add tests/avocado/machines_aspeed.py to test ASPEED SOCs with
 avocado framework
2. Add test case to test "ast1030-evb" machine with zephyr os

Jamin Lin (1):
  test/avocado/machine_aspeed.py: Add ast1030 test case

 tests/avocado/machine_aspeed.py | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 tests/avocado/machine_aspeed.py

-- 
2.17.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/1] test/avocado/machine_aspeed.py: Add ast1030 test case
  2022-03-21  9:16 [PATCH v1 0/1] tests/avocado: Add ast1030 test case Jamin Lin
@ 2022-03-21  9:16 ` Jamin Lin
  2022-03-21 17:39   ` Thomas Huth
  0 siblings, 1 reply; 4+ messages in thread
From: Jamin Lin @ 2022-03-21  9:16 UTC (permalink / raw)
  To: Cleber Rosa, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Beraldo Leal,
	open list:All patches CC here
  Cc: jamin_lin, troy_lee, steven_lee

Add test case to test "ast1030-evb" machine with zephyr os

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 tests/avocado/machine_aspeed.py | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 tests/avocado/machine_aspeed.py

diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
new file mode 100644
index 0000000000..33090af199
--- /dev/null
+++ b/tests/avocado/machine_aspeed.py
@@ -0,0 +1,36 @@
+# Functional test that boots the ASPEED SoCs with firmware
+#
+# Copyright (C) 2022 ASPEED Technology Inc
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later.  See the COPYING file in the top-level directory.
+
+from avocado_qemu import QemuSystemTest
+from avocado_qemu import wait_for_console_pattern
+from avocado_qemu import exec_command_and_wait_for_pattern
+from avocado.utils import archive
+
+
+class AST1030Machine(QemuSystemTest):
+    """Boots the zephyr os and checks that the console is operational"""
+
+    timeout = 10
+
+    def test_ast1030_zephyros(self):
+        """
+        :avocado: tags=arch:arm
+        :avocado: tags=machine:ast1030-evb
+        """
+        tar_url = ('https://github.com/AspeedTech-BMC'
+                   '/zephyr/releases/download/v00.01.04/ast1030-evb-demo.zip')
+        tar_hash = '4c6a8ce3a8ba76ef1a65dae419ae3409343c4b20'
+        tar_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
+        archive.extract(tar_path, self.workdir)
+        kernel_file = self.workdir + "/ast1030-evb-demo/zephyr.elf"
+        self.vm.set_console()
+        self.vm.add_args('-kernel', kernel_file,
+                         '-nographic')
+        self.vm.launch()
+        wait_for_console_pattern(self, "Booting Zephyr OS")
+        exec_command_and_wait_for_pattern(self, "help",
+                                          "Available commands")
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] test/avocado/machine_aspeed.py: Add ast1030 test case
  2022-03-21  9:16 ` [PATCH v1 1/1] test/avocado/machine_aspeed.py: " Jamin Lin
@ 2022-03-21 17:39   ` Thomas Huth
  2022-03-22  3:04     ` Jamin Lin
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2022-03-21 17:39 UTC (permalink / raw)
  To: Jamin Lin, Cleber Rosa, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Beraldo Leal,
	open list:All patches CC here
  Cc: Peter Maydell, troy_lee, steven_lee, Cédric Le Goater, qemu-arm

On 21/03/2022 10.16, Jamin Lin wrote:
> Add test case to test "ast1030-evb" machine with zephyr os
> 
> Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
> ---
>   tests/avocado/machine_aspeed.py | 36 +++++++++++++++++++++++++++++++++
>   1 file changed, 36 insertions(+)
>   create mode 100644 tests/avocado/machine_aspeed.py
> 
> diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
> new file mode 100644
> index 0000000000..33090af199
> --- /dev/null
> +++ b/tests/avocado/machine_aspeed.py
> @@ -0,0 +1,36 @@
> +# Functional test that boots the ASPEED SoCs with firmware
> +#
> +# Copyright (C) 2022 ASPEED Technology Inc
> +#
> +# This work is licensed under the terms of the GNU GPL, version 2 or
> +# later.  See the COPYING file in the top-level directory.
> +
> +from avocado_qemu import QemuSystemTest
> +from avocado_qemu import wait_for_console_pattern
> +from avocado_qemu import exec_command_and_wait_for_pattern
> +from avocado.utils import archive
> +
> +
> +class AST1030Machine(QemuSystemTest):
> +    """Boots the zephyr os and checks that the console is operational"""
> +
> +    timeout = 10
> +
> +    def test_ast1030_zephyros(self):
> +        """
> +        :avocado: tags=arch:arm
> +        :avocado: tags=machine:ast1030-evb
> +        """
> +        tar_url = ('https://github.com/AspeedTech-BMC'
> +                   '/zephyr/releases/download/v00.01.04/ast1030-evb-demo.zip')
> +        tar_hash = '4c6a8ce3a8ba76ef1a65dae419ae3409343c4b20'
> +        tar_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
> +        archive.extract(tar_path, self.workdir)
> +        kernel_file = self.workdir + "/ast1030-evb-demo/zephyr.elf"
> +        self.vm.set_console()
> +        self.vm.add_args('-kernel', kernel_file,
> +                         '-nographic')
> +        self.vm.launch()
> +        wait_for_console_pattern(self, "Booting Zephyr OS")
> +        exec_command_and_wait_for_pattern(self, "help",
> +                                          "Available commands")
Looks like this belongs to a new machine type that we do not have in QEMU 
yet? ... in that case, please send it along in a threaded patch series where 
you add the new machine type, otherwise it does not make much sense to see 
this as a single patch on the list.

  Thomas



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 1/1] test/avocado/machine_aspeed.py: Add ast1030 test case
  2022-03-21 17:39   ` Thomas Huth
@ 2022-03-22  3:04     ` Jamin Lin
  0 siblings, 0 replies; 4+ messages in thread
From: Jamin Lin @ 2022-03-22  3:04 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Peter Maydell, Beraldo Leal, Troy Lee, Steven Lee,
	open list:All patches CC here, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé,
	qemu-arm, Cédric Le Goater, Cleber Rosa

The 03/21/2022 17:39, Thomas Huth wrote:
> On 21/03/2022 10.16, Jamin Lin wrote:
> > Add test case to test "ast1030-evb" machine with zephyr os
> > 
> > Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
> > ---
> >   tests/avocado/machine_aspeed.py | 36 +++++++++++++++++++++++++++++++++
> >   1 file changed, 36 insertions(+)
> >   create mode 100644 tests/avocado/machine_aspeed.py
> > 
> > diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
> > new file mode 100644
> > index 0000000000..33090af199
> > --- /dev/null
> > +++ b/tests/avocado/machine_aspeed.py
> > @@ -0,0 +1,36 @@
> > +# Functional test that boots the ASPEED SoCs with firmware
> > +#
> > +# Copyright (C) 2022 ASPEED Technology Inc
> > +#
> > +# This work is licensed under the terms of the GNU GPL, version 2 or
> > +# later.  See the COPYING file in the top-level directory.
> > +
> > +from avocado_qemu import QemuSystemTest
> > +from avocado_qemu import wait_for_console_pattern
> > +from avocado_qemu import exec_command_and_wait_for_pattern
> > +from avocado.utils import archive
> > +
> > +
> > +class AST1030Machine(QemuSystemTest):
> > +    """Boots the zephyr os and checks that the console is operational"""
> > +
> > +    timeout = 10
> > +
> > +    def test_ast1030_zephyros(self):
> > +        """
> > +        :avocado: tags=arch:arm
> > +        :avocado: tags=machine:ast1030-evb
> > +        """
> > +        tar_url = ('https://github.com/AspeedTech-BMC'
> > +                   '/zephyr/releases/download/v00.01.04/ast1030-evb-demo.zip')
> > +        tar_hash = '4c6a8ce3a8ba76ef1a65dae419ae3409343c4b20'
> > +        tar_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
> > +        archive.extract(tar_path, self.workdir)
> > +        kernel_file = self.workdir + "/ast1030-evb-demo/zephyr.elf"
> > +        self.vm.set_console()
> > +        self.vm.add_args('-kernel', kernel_file,
> > +                         '-nographic')
> > +        self.vm.launch()
> > +        wait_for_console_pattern(self, "Booting Zephyr OS")
> > +        exec_command_and_wait_for_pattern(self, "help",
> > +                                          "Available commands")
> Looks like this belongs to a new machine type that we do not have in QEMU 
> yet? ... in that case, please send it along in a threaded patch series where 
> you add the new machine type, otherwise it does not make much sense to see 
> this as a single patch on the list.
> 
>   Thomas
>
I created a new series patch to support AST1030 model which included
this patch for avocado test.
http://patchwork.ozlabs.org/project/qemu-devel/list/?series=291430
Thanks-Jamin


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-22  3:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21  9:16 [PATCH v1 0/1] tests/avocado: Add ast1030 test case Jamin Lin
2022-03-21  9:16 ` [PATCH v1 1/1] test/avocado/machine_aspeed.py: " Jamin Lin
2022-03-21 17:39   ` Thomas Huth
2022-03-22  3:04     ` Jamin Lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.