github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/cmd/juju/commands/package_test.go (about)

     1  // Copyright 2014 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package commands
     5  
     6  import (
     7  	"flag"
     8  	"runtime"
     9  	stdtesting "testing"
    10  
    11  	gittesting "github.com/juju/testing"
    12  
    13  	cmdtesting "github.com/juju/juju/cmd/testing"
    14  	_ "github.com/juju/juju/provider/dummy"
    15  	"github.com/juju/juju/testing"
    16  )
    17  
    18  func TestPackage(t *stdtesting.T) {
    19  	if runtime.GOARCH == "386" {
    20  		t.Skipf("skipping package for %v/%v, see http://pad.lv/1425569", runtime.GOOS, runtime.GOARCH)
    21  	}
    22  	if gittesting.RaceEnabled {
    23  		t.Skip("skipping test in -race mode, see LP 1518810")
    24  	}
    25  	testing.MgoTestPackage(t)
    26  }
    27  
    28  // Reentrancy point for testing (something as close as possible to) the juju
    29  // tool itself.
    30  func TestRunMain(t *stdtesting.T) {
    31  	if *cmdtesting.FlagRunMain {
    32  		Main(flag.Args())
    33  	}
    34  }