1
0
Fork 0
mirror of https://github.com/Luzifer/aoc2019.git synced 2024-12-22 05:51:16 +00:00

Add make target to execute single days

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-12-06 14:25:29 +01:00
parent df8eec9d2e
commit c4133300d0
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 12 additions and 3 deletions

View file

@ -4,3 +4,8 @@ fulltest:
mkdir -p cover mkdir -p cover
go test -cover -coverprofile ./cover/cover.profile -v *.go go test -cover -coverprofile ./cover/cover.profile -v *.go
go tool cover -html ./cover/cover.profile -o ./cover/index.html go tool cover -html ./cover/cover.profile -o ./cover/index.html
day%:
go test -cover -v \
day$*.go day$*_test.go \
helpers.go intcode.go

View file

@ -2,10 +2,13 @@
This repository contains my solutions for [Advent of Code 2019](https://adventofcode.com/2019/). This repository contains my solutions for [Advent of Code 2019](https://adventofcode.com/2019/).
To execute them just use the tests for the respective day: To execute them just use the tests for the respective day through `make dayXX` (some days require extra code files, the `make` instructions contains them):
```console ```console
# go test -v day01.go day01_test.go helpers.go # make day01
go test -cover -v \
day01.go day01_test.go \
helpers.go intcode.go
=== RUN TestCalculateDay1_Examples === RUN TestCalculateDay1_Examples
--- PASS: TestCalculateDay1_Examples (0.00s) --- PASS: TestCalculateDay1_Examples (0.00s)
=== RUN TestCalculateDay1_Part1 === RUN TestCalculateDay1_Part1
@ -15,5 +18,6 @@ To execute them just use the tests for the respective day:
--- PASS: TestCalculateDay1_Part2 (0.00s) --- PASS: TestCalculateDay1_Part2 (0.00s)
day01_test.go:43: Solution Day 1 Part 2: 4687331 day01_test.go:43: Solution Day 1 Part 2: 4687331
PASS PASS
ok command-line-arguments 0.001s coverage: 23.3% of statements
ok command-line-arguments (cached) coverage: 23.3% of statements
``` ```