Skip to content

Commit c30d675

Browse files
committed
Fix for building on Mac. Added README.md.
1 parent 5ad13db commit c30d675

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

tools/unit-tests/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
LDFLAGS=-lcheck -lm -pthread -lrt -lsubunit
1+
LDFLAGS=-lcheck -lm -pthread
2+
3+
UNAME_S := $(shell uname -s)
4+
ifneq ($(UNAME_S),Darwin)
5+
LDFLAGS+=-lrt -lsubunit
6+
endif
7+
28
CFLAGS=-I../../src -I../../include
39

410
all: unit-parser

tools/unit-tests/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Unit Test Tools
2+
3+
This uses the "check" unit test framework for C.
4+
5+
You may need to run "apt install check", "yum install check" or "brew install check".
6+
7+
## Building
8+
9+
Use `make` to build.
10+
11+
## Expected output
12+
13+
```sh
14+
$ ./unit-parser
15+
Running suite(s): wolfBoot
16+
Explicit end of options reached
17+
This field is too large (bigger than the space available in the current header)
18+
This field is too large and would overflow the image header
19+
Illegal address (too high)
20+
Illegal address (too high)
21+
100%: Checks: 2, Failures: 0, Errors: 0
22+
```

0 commit comments

Comments
 (0)