Update travis to run make build
Ensure all packages can be built, even those not yet imported by binaries. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
a4b2e580f2
commit
dfce91854e
@ -38,6 +38,7 @@ script:
|
||||
- GIT_CHECK_EXCLUDE="./vendor" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE/.../..}" make dco
|
||||
- make fmt
|
||||
- make vet
|
||||
- make build
|
||||
- make binaries
|
||||
- if [ "$GOOS" = "linux" ]; then sudo make install ; fi
|
||||
- if [ "$GOOS" = "linux" ]; then make coverage ; fi
|
||||
|
@ -1,4 +1,4 @@
|
||||
// +build !linux
|
||||
// +build !linux,!windows
|
||||
|
||||
package main
|
||||
|
||||
|
@ -5,8 +5,6 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/continuity/sysx"
|
||||
)
|
||||
|
||||
// Applier applies single file changes
|
||||
@ -96,12 +94,6 @@ func Link(oldname, newname string) Applier {
|
||||
})
|
||||
}
|
||||
|
||||
func SetXAttr(name, key, value string) Applier {
|
||||
return applyFn(func(root string) error {
|
||||
return sysx.LSetxattr(name, key, []byte(value), 0)
|
||||
})
|
||||
}
|
||||
|
||||
// TODO: Make platform specific, windows applier is always no-op
|
||||
//func Mknod(name string, mode int32, dev int) Applier {
|
||||
// return func(root string) error {
|
||||
|
11
fs/fstest/file_unix.go
Normal file
11
fs/fstest/file_unix.go
Normal file
@ -0,0 +1,11 @@
|
||||
// +build !windows
|
||||
|
||||
package fstest
|
||||
|
||||
import "github.com/containerd/continuity/sysx"
|
||||
|
||||
func SetXAttr(name, key, value string) Applier {
|
||||
return applyFn(func(root string) error {
|
||||
return sysx.LSetxattr(name, key, []byte(value), 0)
|
||||
})
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
// +build !windows
|
||||
|
||||
package shim
|
||||
|
||||
import (
|
||||
|
@ -1,3 +1,5 @@
|
||||
// +build linux
|
||||
|
||||
package cgroups
|
||||
|
||||
import (
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
"testing"
|
||||
|
||||
"github.com/containerd/containerd/fs/fstest"
|
||||
@ -28,8 +27,8 @@ func SnapshotterSuite(t *testing.T, name string, snapshotterFn func(ctx context.
|
||||
func makeTest(t *testing.T, name string, snapshotterFn func(ctx context.Context, root string) (snapshot.Snapshotter, func(), error), fn func(ctx context.Context, t *testing.T, snapshotter snapshot.Snapshotter, work string)) func(t *testing.T) {
|
||||
return func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
oldumask := syscall.Umask(0)
|
||||
defer syscall.Umask(oldumask)
|
||||
restoreMask := clearMask()
|
||||
defer restoreMask()
|
||||
// Make two directories: a snapshotter root and a play area for the tests:
|
||||
//
|
||||
// /tmp
|
||||
|
12
snapshot/testsuite/testsuite_unix.go
Normal file
12
snapshot/testsuite/testsuite_unix.go
Normal file
@ -0,0 +1,12 @@
|
||||
// +build !windows
|
||||
|
||||
package testsuite
|
||||
|
||||
import "syscall"
|
||||
|
||||
func clearMask() func() {
|
||||
oldumask := syscall.Umask(0)
|
||||
return func() {
|
||||
syscall.Umask(oldumask)
|
||||
}
|
||||
}
|
5
snapshot/testsuite/testsuite_windows.go
Normal file
5
snapshot/testsuite/testsuite_windows.go
Normal file
@ -0,0 +1,5 @@
|
||||
package testsuite
|
||||
|
||||
func clearMask() func() {
|
||||
return func() {}
|
||||
}
|
@ -6,9 +6,9 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"syscall"
|
||||
"testing"
|
||||
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@ -21,7 +21,7 @@ func init() {
|
||||
// Unmount unmounts a given mountPoint and sets t.Error if it fails
|
||||
func Unmount(t *testing.T, mountPoint string) {
|
||||
t.Log("unmount", mountPoint)
|
||||
if err := syscall.Unmount(mountPoint, 0); err != nil {
|
||||
if err := mount.Unmount(mountPoint, 0); err != nil {
|
||||
t.Error("Could not umount", mountPoint, err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user