From 2b0ca5749cde19ab456c80de133a0bd5f7dc5069 Mon Sep 17 00:00:00 2001 From: Ricardo Martincoski Date: Mon, 12 Feb 2018 19:02:08 -0200 Subject: support/testing: fix job check-gitlab-ci.yml Currently 'run-tests -l' is broken. It breaks 'make .gitlab-ci.yml' that in turn breaks the job in GitLab. TestRustBase is not a test case by itself, so it can't have a method with the name starting with "test_" otherwise nose2 assumes it is a test case. Move the test_run method from the base class to the derived classes. While at it, update .gitlab-ci.yml with the new test cases. Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/52000035 Reported-by: Yegor Yefremov Signed-off-by: Ricardo Martincoski Cc: Eric Le Bihan Cc: Thomas Petazzoni Cc: Yann E. MORIN Cc: Yegor Yefremov Reviewed-by: Yegor Yefremov Signed-off-by: Thomas Petazzoni --- support/testing/tests/package/test_rust.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'support/testing/tests/package/test_rust.py') diff --git a/support/testing/tests/package/test_rust.py b/support/testing/tests/package/test_rust.py index 8035f8b83a..e6c0de2214 100644 --- a/support/testing/tests/package/test_rust.py +++ b/support/testing/tests/package/test_rust.py @@ -53,12 +53,6 @@ class TestRustBase(infra.basetest.BRTest): self.b.build() shutil.rmtree(workdir) - def test_run(self): - self.build_test_prog() - self.login() - _, exit_code = self.emulator.run(self.crate) - self.assertEqual(exit_code, 0) - class TestRustBin(TestRustBase): config = \ @@ -82,6 +76,12 @@ class TestRustBin(TestRustBase): BR2_PACKAGE_HOST_RUSTC=y """ + def test_run(self): + self.build_test_prog() + self.login() + _, exit_code = self.emulator.run(self.crate) + self.assertEqual(exit_code, 0) + class TestRust(TestRustBase): config = \ @@ -105,3 +105,9 @@ class TestRust(TestRustBase): BR2_PACKAGE_HOST_RUSTC=y BR2_PACKAGE_HOST_RUST=y """ + + def test_run(self): + self.build_test_prog() + self.login() + _, exit_code = self.emulator.run(self.crate) + self.assertEqual(exit_code, 0) -- cgit v1.2.3