Menu

#393 Lightweight version of test framework (testfwk)

open
Visenri
5
2021-07-25
2021-07-25
Visenri
No

After adding the new .io mnemonics to pdk ([#3259]), I wanted to test all pdk variants.
pdk13 is supposed to work, but regression tests were disabled for it because of the limited memory (1024 PRG, 64 RAM).

I've created a reduced version of the test framework:

  • The idea was to remove code as much as possible without losing testing functionality.
  • A new macro indicates we are targeting a very low memory device: TARGET_VERY_LOW_MEMORY, must be set for low memory devices.

When that macro is defined:

  • Forces the use of NO_VARARGS version.
  • Different implementation of "__printd" with hex output (no div/mod or library needed).
  • Skipped final strings in "Summary" output to save memory (Not used for any check, AFAIK).
  • "__printu" will not be available in this version (It was not used anyway).

All modifications combined save around 330 bytes of program memory and 50 bytes of RAM, a massive difference for small devices like pdk13.

The difference is enough to allow many tests for pdk13 and to enable some disabled tests for pdk14.

I've also done changes to the python scripts (*-results.py):

  • Added the possibility to parse hex values.
  • Some other unrelated fixes and improvements for unusual output from simulator.

I will commit as soon as testing finishes.

Related

Bugs: #3259
Patches: #394

Discussion

  • Visenri

    Visenri - 2021-07-25

    Maybe we can make this the default version to save memory for all devices.
    For now I would keep it only for pdk13 and pdk14 because it will affect all regression tests outputs (All will show less bytes and less cycles).

    Once all the test results are generated with the automated tests and we check there are no differences, we can enable it for other backends (I've checked it locally, but as seen in [feature-requests:#144], what we get with the test farm is not exactly the same).

     

    Related

    Feature Requests: #144


    Last edit: Visenri 2021-08-30
  • Visenri

    Visenri - 2021-07-25

    Commited in [r12560]

     

Log in to post a comment.