Refactor framework -- point to a tests/* directory for the user supplied tests
This commit is contained in:
24
README.md
Normal file
24
README.md
Normal file
@ -0,0 +1,24 @@
|
||||
# A Mongoose OS I2C Mock
|
||||
|
||||
Files in this repository are a Linux I2C implementation of the Mongoose OS
|
||||
I2C interface.
|
||||
|
||||
## Howto
|
||||
|
||||
Register tests in `tests/*.[ch]` and they will be compiled in. Each test must
|
||||
have functions uniquely named:
|
||||
```
|
||||
bool test_*_create();
|
||||
bool test_*_run();
|
||||
bool test_*_destroy();
|
||||
```
|
||||
|
||||
And static variables named:
|
||||
```
|
||||
uint32_t test_*_period_ms;
|
||||
```
|
||||
|
||||
Running `make` will then generate the test skeleton, recursively compile
|
||||
all sources found in `src/`, `tests/`, and `libs/`, and for each, call the
|
||||
`create()` function, then the `run()` function each `period_ms` milliseconds,
|
||||
and upon exiting, call each `destroy()` function and clean up.
|
Reference in New Issue
Block a user