Message ID | 20170709232123.30120-6-arnout@mind.be |
---|---|
State | Superseded |
Headers | show |
Hello, On Mon, 10 Jul 2017 01:21:21 +0200, Arnout Vandecappelle (Essensium/Mind) wrote: > We piggy-back on an existing test. > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > --- > support/testing/tests/toolchain/test_external.py | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/support/testing/tests/toolchain/test_external.py b/support/testing/tests/toolchain/test_external.py > index afb4bb0b50..c315ef8055 100644 > --- a/support/testing/tests/toolchain/test_external.py > +++ b/support/testing/tests/toolchain/test_external.py > @@ -207,9 +207,13 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y > self.emulator.login() > > class TestExternalToolchainBuildrootuClibc(TestExternalToolchain): > + # On this test we piggy-back a test of BR2_CCACHE in combination > + # with an external toolchain. I'm not sure I'm a big fan of "hijacking" an existing test to validate ccache. Shouldn't we have a separate test for that, clearly identified as being ccache related? Could be a test that inherits from this one, and simply adds more options. But at least in case of failure it will be clearly identified as a CCache related test in the Gitlab CI results. Thanks, Thomas
On 10-07-17 18:01, Thomas Petazzoni wrote: > Hello, > > On Mon, 10 Jul 2017 01:21:21 +0200, Arnout Vandecappelle > (Essensium/Mind) wrote: >> We piggy-back on an existing test. >> >> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> >> --- >> support/testing/tests/toolchain/test_external.py | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/support/testing/tests/toolchain/test_external.py b/support/testing/tests/toolchain/test_external.py >> index afb4bb0b50..c315ef8055 100644 >> --- a/support/testing/tests/toolchain/test_external.py >> +++ b/support/testing/tests/toolchain/test_external.py >> @@ -207,9 +207,13 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y >> self.emulator.login() >> >> class TestExternalToolchainBuildrootuClibc(TestExternalToolchain): >> + # On this test we piggy-back a test of BR2_CCACHE in combination >> + # with an external toolchain. > > I'm not sure I'm a big fan of "hijacking" an existing test to validate > ccache. Shouldn't we have a separate test for that, clearly identified > as being ccache related? > > Could be a test that inherits from this one, and simply adds more > options. But at least in case of failure it will be clearly identified > as a CCache related test in the Gitlab CI results. I didn't want to duplicate stuff, that's why. Inheriting is a great idea. Regards, Arnout
diff --git a/support/testing/tests/toolchain/test_external.py b/support/testing/tests/toolchain/test_external.py index afb4bb0b50..c315ef8055 100644 --- a/support/testing/tests/toolchain/test_external.py +++ b/support/testing/tests/toolchain/test_external.py @@ -207,9 +207,13 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y self.emulator.login() class TestExternalToolchainBuildrootuClibc(TestExternalToolchain): + # On this test we piggy-back a test of BR2_CCACHE in combination + # with an external toolchain. config = BASIC_CONFIG + \ """ BR2_arm=y +BR2_CCACHE=y +BR2_CCACHE_DIR="{builddir}/ccache-dir" BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y @@ -222,6 +226,10 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y """ toolchain_prefix = "arm-linux" + def __init__(self, names): + super(TestExternalToolchainBuildrootuClibc, self).__init__(names) + self.config = self.config.format(builddir = self.builddir) + def test_run(self): TestExternalToolchain.common_check(self) img = os.path.join(self.builddir, "images", "rootfs.cpio")
We piggy-back on an existing test. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> --- support/testing/tests/toolchain/test_external.py | 8 ++++++++ 1 file changed, 8 insertions(+)