@@ -18,21 +18,25 @@ guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md).
1818
1919The requirements to build Machine are:
2020
21- 1 . A running instance of Docker (or alternatively a golang 1.5 development environment)
21+ 1 . A running instance of Docker
22222 . The ` bash ` shell
23233 . [ Make] ( https://www.gnu.org/software/make/ )
2424
2525Call ` export USE_CONTAINER=true ` to instruct the build system to use containers to build.
26- If you want to build natively using golang instead, don't set this variable.
26+
27+ # Alternative: build using go only
28+
29+ Alternatively, you can build without docker, using only golang.
30+
31+ [ Install and setup go] ( https://golang.org/doc/install ) , then clone the machine repository inside your gopath.
2732
2833## Building
2934
3035To build the docker-machine binary, simply run:
3136
32- $ make
37+ $ make build
3338
34- From the Machine repository's root. You will now find a ` bin/docker-machine `
35- binary at the root of the project.
39+ From the Machine repository's root. You will now have a ` bin/docker-machine ` .
3640
3741You may call:
3842
@@ -61,6 +65,8 @@ To generate an html code coverage report of the Machine codebase, run:
6165
6266And navigate to http://localhost:8000 (hit ` CTRL+C ` to stop the server).
6367
68+ ### Native build
69+
6470Alternatively, if you are building natively, you can simply run:
6571
6672 make coverage-html
@@ -80,9 +86,9 @@ This will generate and open the report file:
8086
8187### Build targets
8288
83- Build a single, native machine binary:
89+ Just build the machine binary itself :
8490
85- make build-simple
91+ make `pwd`/bin/docker-machine
8692
8793Build for all supported oses and architectures (binaries will be in the ` bin ` project subfolder):
8894
@@ -97,8 +103,7 @@ You can further control build options through the following environment variable
97103 DEBUG=true # enable debug build
98104 STATIC=true # build static (note: when cross-compiling, the build is always static)
99105 VERBOSE=true # verbose output
100- PARALLEL=X # lets you control build parallelism when cross-compiling multiple builds
101- PREFIX=folder
106+ PREFIX=folder # put binaries in another folder (not the default `./bin`)
102107
103108Scrub build results:
104109
@@ -134,16 +139,12 @@ first make sure to [install it](https://github.com/sstephenson/bats#installing-b
134139
135140### Basic Usage
136141
137- Integration tests can be invoked calling ` make test-integration ` .
138-
139- :warn: you cannot run integration test inside a container for now.
140- Be sure to unset the ` USE_CONTAINER ` env variable if you set it earlier, or alternatively
141- call directly ` ./test/integration/run-bats.sh ` instead of ` make test-integration ` .
142+ You first need to build, calling ` make build ` .
142143
143- You can invoke a test or subset of tests for a particular driver.
144- To set the driver, use the ` DRIVER ` environment variable .
144+ You can then invoke integration tests calling ` DRIVER=foo make test-integration TESTSUITE ` , where ` TESTSUITE ` is
145+ one of the ` test/integration ` subfolder, and ` foo ` is the specific driver you want to test .
145146
146- To invoke just one test :
147+ Examples :
147148
148149``` console
149150$ DRIVER=virtualbox make test-integration test/integration/core/core-commands.bats
@@ -170,13 +171,6 @@ Cleaning up machines...
170171Successfully removed bats-virtualbox-test
171172```
172173
173- To invoke a shared test with a different driver:
174-
175- ``` console
176- $ DRIVER=digitalocean make test-integration test/integration/core/core-commands.bats
177- ...
178- ```
179-
180174To invoke a directory of tests recursively:
181175
182176``` console
0 commit comments