瀏覽代碼

Merge pull request #941 from dotcloud/makefile_test_subpackages

gofmt and test sub directories in makefile
Guillaume J. Charmes 12 年之前
父節點
當前提交
930e1d8830
共有 3 個文件被更改,包括 14 次插入11 次删除
  1. 3 0
      Makefile
  2. 1 1
      auth/auth.go
  3. 10 10
      term/termios_darwin.go

+ 3 - 0
Makefile

@@ -74,6 +74,9 @@ endif
 test: all
 test: all
 	@(cd $(DOCKER_DIR); sudo -E go test $(GO_OPTIONS))
 	@(cd $(DOCKER_DIR); sudo -E go test $(GO_OPTIONS))
 
 
+testall: all
+	@(cd $(DOCKER_DIR); sudo -E go test ./... $(GO_OPTIONS))
+
 fmt:
 fmt:
 	@gofmt -s -l -w .
 	@gofmt -s -l -w .
 
 

+ 1 - 1
auth/auth.go

@@ -82,7 +82,7 @@ func decodeAuth(authStr string) (*AuthConfig, error) {
 func LoadConfig(rootPath string) (*AuthConfig, error) {
 func LoadConfig(rootPath string) (*AuthConfig, error) {
 	confFile := path.Join(rootPath, CONFIGFILE)
 	confFile := path.Join(rootPath, CONFIGFILE)
 	if _, err := os.Stat(confFile); err != nil {
 	if _, err := os.Stat(confFile); err != nil {
-		return &AuthConfig{rootPath:rootPath}, ErrConfigFileMissing
+		return &AuthConfig{rootPath: rootPath}, ErrConfigFileMissing
 	}
 	}
 	b, err := ioutil.ReadFile(confFile)
 	b, err := ioutil.ReadFile(confFile)
 	if err != nil {
 	if err != nil {

+ 10 - 10
term/termios_darwin.go

@@ -9,16 +9,16 @@ const (
 	getTermios = syscall.TIOCGETA
 	getTermios = syscall.TIOCGETA
 	setTermios = syscall.TIOCSETA
 	setTermios = syscall.TIOCSETA
 
 
-	ECHO    = 0x00000008
-	ONLCR   = 0x2
-	ISTRIP  = 0x20
-	INLCR   = 0x40
-	ISIG    = 0x80
-	IGNCR   = 0x80
-	ICANON  = 0x100
-	ICRNL   = 0x100
-	IXOFF   = 0x400
-	IXON    = 0x200
+	ECHO   = 0x00000008
+	ONLCR  = 0x2
+	ISTRIP = 0x20
+	INLCR  = 0x40
+	ISIG   = 0x80
+	IGNCR  = 0x80
+	ICANON = 0x100
+	ICRNL  = 0x100
+	IXOFF  = 0x400
+	IXON   = 0x200
 )
 )
 
 
 type Termios struct {
 type Termios struct {