Commit Graph

91 Commits

Author SHA1 Message Date
James Bardin
77a32f3df0 remove "core" distinction
Since there is little left that isn't core, remove the distinction for
now to reduce confusion, since a "core" binary will mostly work except
for provisioners.
2017-06-12 13:43:54 -04:00
James Bardin
1bd0205e49 remove errcheck
The existing harness was only for aws, which fails now that aws is gone.
2017-06-12 13:43:52 -04:00
Christoph Blecker
3f7a117148 build: Fix Travis vet issues (#14010)
* Use latest in go 1.8 branch for travis

* Fix ongoing vet issues
Move vet step after the testing step in travis
Correct Makefile vet step to check correct files
2017-04-27 13:51:22 +12:00
James Bardin
4ef90d803b test changes to travis
Increase timeout to 60s. The consul backend tests come too close to that
and timout every time they stall a little.
2017-03-22 18:04:29 -04:00
Clint
b0deb7736b Makefile: restore test check deps (#12525) 2017-03-09 13:16:25 +02:00
Mitchell Hashimoto
4ed2a563ca
Disallow parallelism in Makefile 2017-02-17 15:31:58 -08:00
James Bardin
87253e448c
install packages for tests
Running `go test -i` installs the requirements for a package's tests.
This way when running the tests in batches of 4, we can cut the runtime
in half be only compiling the dependencies once.
2017-01-26 14:33:50 -08:00
Mitchell Hashimoto
f4ca79d7b7
Update Makefile to run tests 4 packages at a time
We were running out of RAM on Travis
2017-01-26 14:33:50 -08:00
James Bardin
7f6f11b9f2 Add vendor-status make target
Have vendor-status run govendor-status
Add all the missing .PHONY targets
2017-01-20 11:57:23 -05:00
James Bardin
dfb1d9cbe0 fix vet make target to vet all packages
The vet target was only vetting the topmmost packages.
2017-01-13 17:30:46 -05:00
James Nugent
b9f74e388e build: Add test-compile target (#10348) 2016-11-24 16:44:25 +00:00
Clint
740b8bb9cb provider/aws: Run errcheck in tests (#8579)
* provider/aws: Add errcheck to Makefile, error on unchecked errors

* more exceptions

* updates for errcheck to pass

* reformat and spilt out the ignore statements

* narrow down ignores

* fix typo, only ignore Close and Write, instead of close or write
2016-09-02 09:24:17 -05:00
Jake Champlin
8cbef79dbf Allow specifying ldflags via env vars
Allows specifying `LD_FLAGS` during development builds.

```
$ LD_FLAGS="-linkmode=external" make dev
```

Since the version of DTrace on macOS Sierra (On the public beta's at least) has been updated, this allows DTrace to run on Terraform during development/debugging.

```
$ sudo dtrace -n 'pid$target::main.main:entry' -c "terraform apply"
dtrace: description 'pid$target::main.main:entry' matched 1 probe

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

foo = bar
dtrace: pid 23096 has exited
CPU     ID                    FUNCTION:NAME
  2 265673                  main.main:entry
```

Also redirects the `@which stringer` command inside the `generate` Makefile target to `/dev/null` so we stop echoing the path to the `stringer` binary on every call to `generate`.
2016-08-24 10:56:23 -04:00
John Bowler
922e626b7e Fix Makefile for consistency 2016-07-07 11:11:28 -07:00
John Bowler
4a84697b7d Support make test if TF itself is vendored 2016-07-06 19:17:35 -07:00
James Nugent
27d21778a2 build: Allow TESTARGS on make core-test 2016-06-22 16:32:43 +03:00
James Nugent
3593ea8b0a build: Remove format check from plugin-dev
This is intended to reduce cycle time during provider development.
2016-06-11 13:27:08 +01:00
James Nugent
1b011dedf4 build: Skip running tests on /builtin/bins
This is time consuming and spams the output of Travis - to run no tests.
2016-06-11 13:09:19 +01:00
James Nugent
8895b567f4 build: Add tools target to Makefile 2016-06-02 23:22:20 -05:00
Martin Atkins
78a9f8bfb4 build: "make fmt" to ignore vendor packages
Several of our vendered dependencies are not gofmt-compliant, but we don't
want to fix that since the vendored code is supposed to exactly match
upstream.
2016-05-10 15:40:02 -07:00
James Nugent
0c56144d7f build: Only build once for core-dev 2016-05-10 14:49:13 -04:00
Chris Bednarski
6360e6c8b6 Implemented internal plugin calls; which allows us to compile plugins into the main terraform binary 2016-05-10 14:40:11 -04:00
Poney baker
03c64b9ba5 fix(Makefile): remove 'updatedeps' from .PHONY 2016-05-10 14:30:31 +02:00
Martin Atkins
a1530855a3 Build release binaries in release mode
This strips debug information from the binaries, making them slightly
smaller.
2016-04-19 09:50:46 -07:00
James Nugent
9c236e7508 build: Remove gofmt check from core-dev target 2016-04-13 08:40:35 -05:00
Joshua Spence
cfc2890310 Remove TF_QUICKDEV environment variable
This environment variable doesn't seem to be used, the last usage was removed in 6fe2703665.
2016-04-09 21:56:25 +10:00
James Nugent
76f203e7e4 build: Update make core-test for vendoring 2016-03-03 18:08:31 -06:00
Paul Hinze
d21b0897a9 Makefile/docs: Lock in 1.6 req, doc vendored deps
* Drop Go 1.5 compatibility env vars
 * Drop `make updatedeps` from `Makefile` and docs
 * Update README w/ vendored dep instructions
2016-02-24 16:13:49 -06:00
James Nugent
ac957ab329 Run vet target on default target 2016-02-22 13:35:50 -05:00
Trevor Pounds
ebe5346e8f Enable all go vet warnings. 2016-02-17 13:29:51 -08:00
James Nugent
bc6107508d Fix additional vet warnings 2016-02-17 11:59:50 -08:00
Trevor Pounds
3eb65f2cbb Enable go vet -unusedresult check and fix warnings. 2016-02-17 11:59:50 -08:00
Trevor Pounds
79742fc367 Enable go vet -composites check and fix warnings. 2016-02-17 11:59:50 -08:00
Trevor Pounds
8e6d11fc5e Do not go vet vendor dependencies. 2016-02-17 11:59:49 -08:00
Paul Hinze
6fe2703665 Vendor all dependencies w/ Godep
* Remove `make updatedeps` from Travis build. We'll follow up with more
   specific plans around dependency updating in subsequent PRs.
 * Update all `make` targets to set `GO15VENDOREXPERIMENT=1` and to
   filter out `/vendor/` from `./...` where appropriate.
 * Temporarily remove `vet` from the `make test` target until we can
   figure out how to get it to not vet `vendor/`. (Initial
   experimentation failed to yield the proper incantation.)

Everything is pinned to current master, with the exception of:

 * Azure/azure-sdk-for-go which is pinned before the breaking change today
 * aws/aws-sdk-go which is pinned to the most recent tag

The documentation still needs to be updated, which we can do in a follow
up PR. The goal here is to unblock release.
2016-01-29 15:08:48 -06:00
James Nugent
fc667b6763 core: Add make core-test target 2016-01-21 18:01:21 -05:00
James Nugent
c4c5a0c7d4 Increase acceptance test timeout to 120m from 90m 2016-01-07 13:02:04 -08:00
James Nugent
6d6487e288 Make gofmt errors fail build and add make fmt
We may want to consider requiring `gofmt -s` compliance in future
builds, but for now we just use `gofmt`.
2015-12-17 12:35:13 -05:00
James Nugent
54ce59ebdd Remove release target and document cross-compiling
Also document the `plugin-dev` and `core-dev` targets.
2015-12-08 13:10:40 -05:00
Philipp Preß
a4c62673ee Remove redundant -build-toolchain for gox
Running `make release` on the provided Vagrant machine errors with an error.

Removing the `-build-toolchain` fixes it.
2015-12-08 15:09:04 +01:00
James Nugent
13548fcaa2 Add core-dev target to Makefile
This is shorthand to build and install the core of terraform, without
touching the providers.
2015-11-18 16:59:58 +02:00
Martin Atkins
3af5552b54 Makefile target to build a single plugin for local testing.
Often when developing a plugin it's only necessary to rebuild that plugin.
Here we add a simple Makefile target that makes that easy:

    make plugin-dev PLUGIN=provider-aws

Since it's only building one package and it's only building for the
host architecture, this just uses "go install" directly, rather than using
gox as we do when installing multiple packages, possibly for multiple
architectures.
2015-10-11 14:24:23 -07:00
Florin Patan
a75ca1e25c Support go get in go 1.5 2015-07-31 00:34:58 +02:00
Paul Hinze
4a65d83741 maint: Codify a Vagrant-based release process
* update Vagrantfile to modern Consul-style version
 * add `make release` for a one-shot command to get from fresh vagrant
   machine to a built release
 * add RELEASING.md to document details about the release process
2015-06-01 10:34:13 -05:00
Radek Simko
bb864fb527 Increase default timeout for acceptance tests 2015-05-31 17:08:57 +01:00
Paul Hinze
be2ec7a61a Makefile: make go vet break the build 2015-05-30 12:52:24 -05:00
Chris Bednarski
a1dd906f2e Move TEST to end of line 2015-05-29 10:56:15 -07:00
Chris Bednarski
106af364b3 Change the example to something that actually works 2015-05-29 10:55:16 -07:00
Chris Bednarski
7e51225ca9 Tweak some of the makefile help messages for clarity 2015-05-29 10:45:20 -07:00
Jeff Mitchell
996e7ff3e4 Add quickdev option; skips getting dependencies to make repeated builds a bit faster and less network-heavy 2015-03-06 17:07:16 +00:00