[Buildroot] [PATCH v5 02/10] testing/infra: split runtime test from BRTest

Arnout Vandecappelle arnout at mind.be
Mon Feb 4 15:55:12 UTC 2019



On 12/05/2018 04:58, Ricardo Martincoski wrote:
> From: Ricardo Martincoski <ricardo.martincoski at datacom.ind.br>
> 
> Move the setup of emulator to a new class, RuntimeTestBase, that bahaves
> exactly like BRTest currently does.
> It will avoid duplicating code when adding a common class to test the
> git download infra.
> 
> Change all current test cases to use the new class.
> Do this by first using automatic replace:
> $ find support/testing/ -name '*.py' | \
>   xargs grep -l BRTest | \
>   xargs sed -i \
>     -e 's,import infra.basetest,\0\nimport infra.runtimetest,g' \
>     -e 's,infra.basetest.BRTest,infra.runtimetest.RuntimeTestBase,g'
> and then manually add code to import runtimetest in test_external.py to
> avoid this error:
>  AttributeError: 'module' object has no attribute 'LoadTestsFailure'
> This explicit import was not need before because run-tests imports
> BRTest and this is the only test file that do not use the defconfig
> fragments from basetest.py in its code.
> 
> Signed-off-by: Ricardo Martincoski <ricardo.martincoski at datacom.ind.br>
> Cc: Arnout Vandecappelle <arnout at mind.be>
> ---
> WARNING: this patch changes all current test cases, so if a new test case was
> applied after this patch was sent, 'git am' will apply this patch cleanly, yet
> any testcase created in the meantime will be broken.
> But I can refresh it if need. It will probably only need the automatic replace
> from the commit log to be re-run.

 This seems to be an optimisation rather than a requirement for the other
patches, so I haven't applied this - it needs to be refreshed first.

 If you do so before Wednesday, we might still apply it.

 Regards,
 Arnout


More information about the buildroot mailing list