From 70b2a9e855f21689ee5ba5436f729f5950760a72 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 31 Dec 2018 12:51:07 +0100 Subject: Makefile: collect coverage report for codecov.io --- .travis.yml | 3 +++ Makefile | 6 ++++++ README.md | 6 +++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ee01dabf8..f3a9aeda8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,9 @@ script: - make install_prerequisites - make presubmit +after_success: + - bash <(curl -s https://codecov.io/bash) + # If the build fails because some code in not formatted, it's nice to see the diffs after formatting. after_failure: - git diff --name-only diff --git a/Makefile b/Makefile index 3bfd137db..8a90607fc 100644 --- a/Makefile +++ b/Makefile @@ -302,8 +302,14 @@ presubmit: presubmit_parallel: test test_race arch check_links test: +ifeq ("$(TRAVIS)$(shell go version | grep 1.9)", "") # Executor tests use cgo. env CGO_ENABLED=1 $(GO) test -short ./... +else + # Collect coverage report for codecov.io when running on travis (uploaded in .travis.yml). + # Note: Go 1.9 does not support -coverprofile when testing multiple packages. + env CGO_ENABLED=1 $(GO) test -short -coverprofile=coverage.txt ./... +endif test_race: $(GO) test -race; if test $$? -ne 2; then \ diff --git a/README.md b/README.md index 8da5d4fb1..ef1b2f76d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # syzkaller - kernel fuzzer -[![Build Status](https://travis-ci.org/google/syzkaller.svg?branch=master)](https://travis-ci.org/google/syzkaller) [![Go Report Card](https://goreportcard.com/badge/github.com/google/syzkaller)](https://goreportcard.com/report/github.com/google/syzkaller) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) +[![Build Status](https://travis-ci.org/google/syzkaller.svg?branch=master)](https://travis-ci.org/google/syzkaller) +[![Go Report Card](https://goreportcard.com/badge/github.com/google/syzkaller)](https://goreportcard.com/report/github.com/google/syzkaller) +[![Coverage Status](https://codecov.io/gh/google/syzkaller/graph/badge.svg)](https://codecov.io/gh/google/syzkaller) +[![GoDoc](https://godoc.org/github.com/google/syzkaller?status.svg)](https://godoc.org/github.com/google/syzkaller) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) `syzkaller` is an unsupervised coverage-guided kernel fuzzer. `Linux` kernel fuzzing has the most support, `akaros`, `freebsd`, `fuchsia`, `netbsd`, `windows` and `gvisor` are supported to varying degrees. -- cgit mrf-deployment