github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/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  	"os"
     9  	"runtime"
    10  	stdtesting "testing"
    11  
    12  	cmdtesting "github.com/juju/juju/cmd/testing"
    13  	_ "github.com/juju/juju/provider/dummy"
    14  	"github.com/juju/juju/testing"
    15  )
    16  
    17  func TestPackage(t *stdtesting.T) {
    18  	if runtime.GOARCH == "386" {
    19  		t.Skipf("skipping package for %v/%v, see http://pad.lv/1425569", runtime.GOOS, runtime.GOARCH)
    20  	}
    21  	testing.MgoTestPackage(t)
    22  }
    23  
    24  // Reentrancy point for testing (something as close as possible to) the juju
    25  // tool itself.
    26  func TestRunMain(t *stdtesting.T) {
    27  	if *cmdtesting.FlagRunMain {
    28  		os.Exit(Main(flag.Args()))
    29  	}
    30  }