How does one run tests?

Posted on
  • The README says

    The tests here are run automatically when you type './espruino test'. Ideally their name would represent what they tested, but this hasn't been done yet.

    Yet there is no espruino executable file. Is there a way to run all the tests?

  • Ahh. You have to compile your own. On Linux it's quite easy.

    And the readme needs updating, you use --test now.

  • The only make targets in the Makefile are:


    Tried each with BOARDNAME=1 RELEASE=1 ESPRUINO_1V3=1 make <target>, but no espruino script, only the binaries, so the compiler works.

    Tried with LINUX=1 make, and it outputs a lot of warnings and this error

    libs/graphics/lcd_sdl.c:18:21: fatal error: SDL/SDL.h: No such file or directory
    # include <SDL/SDL.h>

    Tried with BOARDNAME=1 RELEASE=1 ESPRUINO_1V3=1 LINUX=1 make, and it exits with this error:

    src/jsutils.c:21:19: fatal error: mconf.h: No such file or directory
     # include "mconf.h"

    Tried with LINUX=1 make -i (ignore errors), to no avail. Cleaned every time before new run.

    Any hints? :)

  • Just try make (no target needed for Linux), but open the Make file and remove the line that's USE_SDL=1 or similar. I thought that was disabled but maybe somehow I committed it by mistake.

  • Indeed the USE_LCD_SDL=1 was the problem. Thanks.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

How does one run tests?

Posted by Avatar for randunel @randunel