diff --git a/.gitignore b/.gitignore index 6133f72a8..a7ab05650 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out +coverage.txt # Python *.pyc @@ -17,8 +18,14 @@ .vscode .idea dist/ -github_token -.github_token +*_token +downloader/*.jpg + +# Ignore compiled binaries +# - native +annie +# - gox builds +annie_* # macOS .DS_Store diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/go.test.sh b/go.test.sh index 012162b07..d317ca963 100755 --- a/go.test.sh +++ b/go.test.sh @@ -1,12 +1,18 @@ -#!/usr/bin/env bash +#!/bin/bash set -e -echo "" > coverage.txt +#set -x # debug/verbose execution + +# Ensures removal of file +trap 'rm -f profile.out downloader/*.{mp4,download,jpg}' SIGINT EXIT + +# go -race needs CGO_ENABLED to proceed +export CGO_ENABLED=1; for d in $(go list ./... | grep -v vendor); do - go test -race -coverprofile=profile.out -covermode=atomic "$d" - if [ -f profile.out ]; then - cat profile.out >> coverage.txt - rm profile.out - fi + go test -v -race -coverprofile=profile.out -covermode=atomic "${d}" + if [ -f profile.out ]; then + cat profile.out > coverage.txt + rm profile.out + fi done