mirror of https://github.com/dsoprea/go-exif.git
Do not include v1/legacy in coverage
parent
25524615d1
commit
ebd20ffc59
|
@ -12,4 +12,9 @@ install:
|
||||||
- go get -t ./...
|
- go get -t ./...
|
||||||
- go get github.com/mattn/goveralls
|
- go get github.com/mattn/goveralls
|
||||||
script:
|
script:
|
||||||
- goveralls -v -service=travis-ci
|
# Don't test recursively, so we stay within v1/legacy.
|
||||||
|
- go test -v github.com/dsoprea/go-exif
|
||||||
|
- go test -v github.com/dsoprea/go-exif/exif-read-tool
|
||||||
|
# Coverage is based on v2.
|
||||||
|
- cd v2
|
||||||
|
- EXIF_MODULE_ROOT_PATH="$(pwd)" goveralls -v -service=travis-ci
|
||||||
|
|
|
@ -24,6 +24,11 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetModuleRootPath() string {
|
func GetModuleRootPath() string {
|
||||||
|
moduleRootPath := os.Getenv("EXIF_MODULE_ROOT_PATH")
|
||||||
|
if moduleRootPath != "" {
|
||||||
|
return moduleRootPath
|
||||||
|
}
|
||||||
|
|
||||||
currentWd, err := os.Getwd()
|
currentWd, err := os.Getwd()
|
||||||
log.PanicIf(err)
|
log.PanicIf(err)
|
||||||
|
|
||||||
|
@ -33,14 +38,11 @@ func GetModuleRootPath() string {
|
||||||
for {
|
for {
|
||||||
tryStampFilepath := path.Join(currentPath, ".MODULE_ROOT")
|
tryStampFilepath := path.Join(currentPath, ".MODULE_ROOT")
|
||||||
|
|
||||||
f, err := os.Open(tryStampFilepath)
|
_, err := os.Stat(tryStampFilepath)
|
||||||
if err == nil {
|
if err != nil && os.IsNotExist(err) != true {
|
||||||
f.Close()
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
if err.Error() != "No such file or directory" {
|
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
|
} else if err == nil {
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
visited = append(visited, tryStampFilepath)
|
visited = append(visited, tryStampFilepath)
|
||||||
|
|
Loading…
Reference in New Issue