Fix for building on Mac. Added README.md.

pull/70/head
David Garske 2020-08-13 13:02:59 -07:00
parent 5ad13dbac0
commit c30d675e38
2 changed files with 29 additions and 1 deletions

View File

@ -1,4 +1,10 @@
LDFLAGS=-lcheck -lm -pthread -lrt -lsubunit
LDFLAGS=-lcheck -lm -pthread
UNAME_S := $(shell uname -s)
ifneq ($(UNAME_S),Darwin)
LDFLAGS+=-lrt -lsubunit
endif
CFLAGS=-I../../src -I../../include
all: unit-parser

View File

@ -0,0 +1,22 @@
# Unit Test Tools
This uses the "check" unit test framework for C.
You may need to run "apt install check", "yum install check" or "brew install check".
## Building
Use `make` to build.
## Expected output
```sh
$ ./unit-parser
Running suite(s): wolfBoot
Explicit end of options reached
This field is too large (bigger than the space available in the current header)
This field is too large and would overflow the image header
Illegal address (too high)
Illegal address (too high)
100%: Checks: 2, Failures: 0, Errors: 0
```