Add file structure for automatic unit-testing

This commit is contained in:
2024-09-30 17:20:11 +02:00
parent e323ef4783
commit 396662bf7c
10 changed files with 31 additions and 2 deletions

View File

@@ -79,6 +79,11 @@ distclean: clean
$(E) "[REM] $(BINDIR)" $(E) "[REM] $(BINDIR)"
$(Q) $(RMR) $(BINDIR) $(Q) $(RMR) $(BINDIR)
.PHONY: check
check:
$(E) "[CHK] Not implemented."
$(Q) true
.PHONY: listen .PHONY: listen
listen: opt/tools/serial-listen listen: opt/tools/serial-listen
$(E) "[RUN] $<" $(E) "[RUN] $<"

View File

@@ -36,6 +36,13 @@ of these commands:
make clean make clean
make distclean make distclean
Isolated unit tests allow you to verify all testable
components are behaving as expected. Please note that most
tests will be added later down the road, when the project
has reached a more mature state.
make check
You can listen on the serial debug interface by running You can listen on the serial debug interface by running
the command below. This will also initialize all optional the command below. This will also initialize all optional
submodules on first invocation. submodules on first invocation.
@@ -64,8 +71,8 @@ Issue the SET command to update the target settings:
Settings are stored in EEPROM and are persistent until a new Settings are stored in EEPROM and are persistent until a new
SET command is issued. Keywords are not case-sensitive. Both SET command is issued. Keywords are not case-sensitive. Both
arguments may contain a decimal point followed by a sequence arguments may contain an optional decimal point followed by
of digits. a sequence of digits.
### Webinterface Example ### Webinterface Example

1
tests/bus/test-i2c.c Normal file
View File

@@ -0,0 +1 @@
static void *TODO;

1
tests/bus/test-mosfet.c Normal file
View File

@@ -0,0 +1 @@
static void *TODO;

1
tests/bus/test-pwm.c Normal file
View File

@@ -0,0 +1 @@
static void *TODO;

1
tests/bus/test-usart.c Normal file
View File

@@ -0,0 +1 @@
static void *TODO;

1
tests/common/test-math.c Normal file
View File

@@ -0,0 +1 @@
static void *TODO;

View File

@@ -0,0 +1 @@
static void *TODO;

View File

@@ -0,0 +1 @@
static void *TODO;

10
tests/main.c Normal file
View File

@@ -0,0 +1,10 @@
// TODO: Automatic unit-testing.
int main(void)
{
// 1. Write unit-tests.
// 2. Run them.
// 3. Profit!
return 0;
}