Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host side tests (Phase 2) #1715

Open
12 of 17 tasks
igrr opened this issue Mar 3, 2016 · 3 comments
Open
12 of 17 tasks

Host side tests (Phase 2) #1715

igrr opened this issue Mar 3, 2016 · 3 comments
Assignees
Labels
help wanted Help needed from the community type: enhancement
Milestone

Comments

@igrr
Copy link
Member

igrr commented Mar 3, 2016

This issue is tracking implementation of a set of mocks which enable testing parts of the core on the PC, and writing relevant tests.

Easy testing targets include core classes (String, Stream, Print), heap management functions, and filesystem APIs.

Testing WiFiClient, WiFiClientSecure, WiFiServer, ESP8266WebServer, ESP8266httpClient is also possible, but requires a bit more work to build Linux port of LwIP and link against it.

To do list:

Phase 1 (#1716)

  • initial batch of mocks
  • some filesystem tests
  • add makefile, run tests on Travis
  • correct license headers in all mock files
  • measure coverage for host based tests

Phase 2

  • mock for HardwareSerial
  • more filesystem tests
  • optional replacement of malloc/free/new/delete in test environment — to test against simulated 40k heap. Need to figure out how to support different behaviour of operator new and operator delete in parts of code under test and in test runner.
  • (new) unify host-tests and emulation-on-host APIs

Phase 3

  • tests for number formatting functions in core_esp8266_noniso.c
  • tests for String class

Phase 4

  • LwIP port for Linux and infrastructure to link tests against it
  • tests for WiFiClient/WiFiServer
    (update: can be done by adding more device tests now also runnable on host)

Phase 5

  • AxTLS BearSSL Linux build
    (done with emulation-on-host)
  • tests for WiFiClientSecure
    (device test test_sw_http_client is working on host with https w/ BearSSL using WiFiClientSecure)

Phase 6 (edit: done via running device tests on host)

  • tests for ESP8266WebServer
  • tests for ESP8266HTTPClient

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@igrr igrr added this to the 2.2.0 milestone Mar 3, 2016
@igrr igrr modified the milestones: 2.2.0, 2.3.0 Apr 18, 2016
@igrr igrr modified the milestones: 2.3.0, 2.4.0 Jun 3, 2016
@igrr igrr modified the milestones: 2.4.0, 2.5.0 Dec 27, 2017
@earlephilhower earlephilhower self-assigned this Oct 2, 2018
@devyte devyte unassigned igrr Oct 2, 2018
@devyte devyte changed the title Host side tests Host side tests (Phase 2) Oct 2, 2018
@d-a-v d-a-v self-assigned this Oct 12, 2018
@d-a-v d-a-v modified the milestones: 2.5.0, 2.6.0 Oct 12, 2018
@d-a-v d-a-v modified the milestones: 2.6.0, 2.5.0 Nov 15, 2018
@devyte
Copy link
Collaborator

devyte commented Dec 1, 2018

Progress has been done, but more work remains. Pushing back for next steps.

@devyte devyte modified the milestones: 2.5.0, 2.6.0 Dec 1, 2018
@devyte devyte added the help wanted Help needed from the community label Dec 1, 2018
@devyte
Copy link
Collaborator

devyte commented Oct 29, 2019

@earlephilhower @d-a-v is there anything further to add here before moving on? If not, I'll push back.

@d-a-v d-a-v modified the milestones: 2.6.0, 2.7.0 Oct 31, 2019
@d-a-v
Copy link
Collaborator

d-a-v commented Jan 6, 2020

There'll always be something pending in this feature request.
Let's just not close it and keep regularly pushing it back so we can discuss on its state.

Currenly as @earlephilhower stated a short while ago, we have

  • host tests (history)
  • emulation on host (quite recent)
  • device tests (recent)

Device tests use emulation on host, but host tests uses a different API for a subset of function.
This needs to be unified.

@devyte devyte modified the milestones: 2.7.0, 3.0.0 Jan 20, 2020
@d-a-v d-a-v modified the milestones: 3.0.0, 4.0.0 Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help needed from the community type: enhancement
Projects
None yet
Development

No branches or pull requests

4 participants