Fixes for multiplatform dev and testing from forks (#7734)

Add support for correct dependency URLs on all platforms

only build mountinfo.go on linux

make testfile path relative to support fork work
master
Joe Stevens 6 years ago committed by kannappanr
parent 8b0c86298d
commit a19cf063b5
  1. 7
      Makefile
  2. 2
      pkg/mountinfo/mountinfo.go
  3. 4
      pkg/s3select/select_test.go

@ -2,6 +2,9 @@ PWD := $(shell pwd)
GOPATH := $(shell go env GOPATH)
LDFLAGS := $(shell go run buildscripts/gen-ldflags.go)
GOOS := $(shell go env GOOS)
GOOSALT := $(shell if [ ${GOOS} == 'darwin' ]; then echo 'mac'; else echo ${GOOS}; fi;)
TAG ?= $(USER)
BUILD_LDFLAGS := '$(LDFLAGS)'
@ -14,8 +17,8 @@ checks:
getdeps:
@mkdir -p ${GOPATH}/bin
@which golint 1>/dev/null || (echo "Installing golint" && go get -u golang.org/x/lint/golint)
@which staticcheck 1>/dev/null || (echo "Installing staticcheck" && wget --quiet -O ${GOPATH}/bin/staticcheck https://github.com/dominikh/go-tools/releases/download/2019.1/staticcheck_linux_amd64 && chmod +x ${GOPATH}/bin/staticcheck)
@which misspell 1>/dev/null || (echo "Installing misspell" && wget --quiet https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_linux_64bit.tar.gz && tar xf misspell_0.3.4_linux_64bit.tar.gz && mv misspell ${GOPATH}/bin/misspell && chmod +x ${GOPATH}/bin/misspell && rm -f misspell_0.3.4_linux_64bit.tar.gz)
@which staticcheck 1>/dev/null || (echo "Installing staticcheck" && wget --quiet -O ${GOPATH}/bin/staticcheck https://github.com/dominikh/go-tools/releases/download/2019.1/staticcheck_${GOOS}_amd64 && chmod +x ${GOPATH}/bin/staticcheck)
@which misspell 1>/dev/null || (echo "Installing misspell" && wget --quiet https://github.com/client9/misspell/releases/download/v0.3.4/misspell_0.3.4_${GOOSALT}_64bit.tar.gz && tar xf misspell_0.3.4_${GOOSALT}_64bit.tar.gz && mv misspell ${GOPATH}/bin/misspell && chmod +x ${GOPATH}/bin/misspell && rm -f misspell_0.3.4_${GOOSALT}_64bit.tar.gz)
crosscompile:
@(env bash $(PWD)/buildscripts/cross-compile.sh)

@ -1,3 +1,5 @@
// +build linux
/*
* MinIO Cloud Storage, (C) 2017 MinIO, Inc.
*

@ -18,12 +18,10 @@ package s3select
import (
"bytes"
"go/build"
"io"
"io/ioutil"
"net/http"
"os"
"path"
"reflect"
"testing"
)
@ -174,7 +172,7 @@ func TestParquetInput(t *testing.T) {
`)
getReader := func(offset int64, length int64) (io.ReadCloser, error) {
testdataFile := path.Join(build.Default.GOPATH, "src/github.com/minio/minio/pkg/s3select/testdata.parquet")
testdataFile := "testdata.parquet"
file, err := os.Open(testdataFile)
if err != nil {
return nil, err

Loading…
Cancel
Save