Browse Source

Run tests through Makefile

tags/v0.1.0
Alex Williams 8 months ago
parent
commit
227e5f8bbd
Signed by: aw GPG Key ID: 19EE4AAA361A7E2C
2 changed files with 17 additions and 7 deletions
  1. +1
    -3
      .github/workflows/main.yml
  2. +16
    -4
      Makefile

+ 1
- 3
.github/workflows/main.yml View File

@ -14,6 +14,4 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
- run: make

+ 16
- 4
Makefile View File

@ -1,14 +1,26 @@
# Makefile to build the boawp validator
# Makefile to build the BOAWP validator
.PHONY: all
all: test build doc
all: build doc tests
test:
cargo test
tests: tests-cargo tests-bad tests-good
build:
cargo build
doc:
cargo doc
tests-cargo:
cargo test --quiet
tests-bad: build
for x in $$(ls testdata/bad-*.bin) ; do \
./target/debug/validate "$$x" 2>/dev/null || echo -n ; \
done
tests-good: build
for x in $$(ls testdata/good-*.bin) ; do \
./target/debug/validate "$$x" >/dev/null ; \
done

Loading…
Cancel
Save