github.com/snowflakedb/gosnowflake@v1.9.0/Makefile (about)

     1  NAME:=gosnowflake
     2  VERSION:=$(shell git describe --tags --abbrev=0)
     3  REVISION:=$(shell git rev-parse --short HEAD)
     4  COVFLAGS:=
     5  
     6  ## Run fmt, lint and test
     7  all: fmt lint cov
     8  
     9  include gosnowflake.mak
    10  
    11  ## Run tests
    12  test_setup: test_teardown
    13  	python3 ci/scripts/hang_webserver.py 12345 &
    14  
    15  test_teardown:
    16  	kill -9 $$(ps -ewf | grep hang_webserver | grep -v grep | awk '{print $$2}') || true
    17  
    18  test: deps test_setup
    19  	./ci/scripts/execute_tests.sh
    20  
    21  ## Run Coverage tests
    22  cov:
    23  	make test COVFLAGS="-coverprofile=coverage.txt -covermode=atomic"
    24  
    25  
    26  
    27  ## Lint
    28  lint: clint
    29  
    30  ## Format source codes
    31  fmt: cfmt
    32  	@for c in $$(ls cmd); do \
    33  		(cd cmd/$$c;  make fmt); \
    34  	done
    35  
    36  ## Install sample programs
    37  install:
    38  	for c in $$(ls cmd); do \
    39  		(cd cmd/$$c;  GOBIN=$$GOPATH/bin go install $$c.go); \
    40  	done
    41  
    42  ## Build fuzz tests
    43  fuzz-build:
    44  	for c in $$(ls | grep -E "fuzz-*"); do \
    45  		(cd $$c; make fuzz-build); \
    46  	done
    47  
    48  ## Run fuzz-dsn
    49  fuzz-dsn:
    50  	(cd fuzz-dsn; go-fuzz -bin=./dsn-fuzz.zip -workdir=.)
    51  
    52  .PHONY: setup deps update test lint help fuzz-dsn