Skip to content

Commit

Permalink
Makefile: remove SKIP_BOOTSTRAP
Browse files Browse the repository at this point in the history
This is a relic of the past. We always need our `cmd`s, and this was
previously done in TC.

Also update some rotten docs while I'm here.
  • Loading branch information
tamird committed Dec 2, 2016
1 parent 57a6ccb commit 02ba2e2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 26 deletions.
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

2. Get the CockroachDB code:

```bash
```shell
go get -d github.com/cockroachdb/cockroach
cd $GOPATH/src/github.com/cockroachdb/cockroach
```
Expand All @@ -26,12 +26,12 @@ will be in your current directory and can be run as shown in the
[README](README.md).

Note that if you edit a `.proto` or `.ts` file, you will need to manually
regenerate the associated `.pb.{go,cc,h}` or `.js` files using `go generate
./...`.
regenerate the associated `.pb.{go,cc,h}` or `.js` files using
`go generate ./pkg/...`.

We advise to run `go generate` using our embedded Docker setup.
`build/builder.sh` is a wrapper script designed to make this convenient. You can
run `build/builder.sh env SKIP_BOOTSTRAP=0 go generate ./...` from the repository
run `build/builder.sh go generate ./pkg/...` from the repository
root to get the intended result.

If you want to run it outside of Docker, `go generate` requires a collection
Expand Down Expand Up @@ -66,7 +66,7 @@ To add or update a go dependency:
Remember to write tests! The following are helpful for running specific
subsets of tests:

```bash
```shell
make test
# Run all tests in ./pkg/storage
make test PKG=./pkg/storage
Expand All @@ -87,9 +87,9 @@ To add or update a go dependency:
not point to a specific package; those commits may begin with "*:" or "all:"
to indicate their reach.

+ Run the whole CI test suite locally: `./build/circle-local.sh`. This requires
the Docker setup; if you don't have/want that,
`go generate ./... && make check test testrace` is a good first approximation.
+ Run the test suite locally:

`go generate ./pkg/... && make check test testrace`

+ When you’re ready for review, groom your work: each commit should pass tests
and contain a substantial (but not overwhelming) unit of work. You may also
Expand Down Expand Up @@ -151,7 +151,7 @@ Peeking into a running cluster can be done in several ways:
An easy way to locally run a workload against a cluster are the acceptance
tests. For example,

```bash
```shell
make acceptance TESTS='TestPut$$' TESTFLAGS='-v -d 1200s -l .' TESTTIMEOUT=1210s
```

Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ testraceslow: testslow
# github.com/cockroachdb/cockroach/gossip), and this target needs to create
# the test binary in the correct location and `cd` to the correct directory.
# This is handled by having `go list` produce the command line.
# - PKG may also be recursive (e.g. './...'). This is also handled by piping
# - PKG may also be recursive (e.g. './pkg/...'). This is also handled by piping
# through `go list`.
# - PKG may not contain any tests! This is handled with an `if` statement that
# checks for the presence of a test binary before running `stress` on it.
Expand Down Expand Up @@ -200,8 +200,6 @@ protobuf:

include .go-version

ifneq ($(SKIP_BOOTSTRAP),1)

# If we're in a git worktree, the git hooks directory may not be in our root,
# so we ask git for the location.
#
Expand Down Expand Up @@ -231,5 +229,3 @@ $(GLOCK):
touch $@

include .bootstrap

endif
1 change: 0 additions & 1 deletion build/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ docker run -i ${tty-} --rm \
${vols} \
--workdir="/go/src/github.com/cockroachdb/cockroach" \
--env="PAGER=cat" \
--env="SKIP_BOOTSTRAP=1" \
--env="JSPM_GITHUB_AUTH_TOKEN=${JSPM_GITHUB_AUTH_TOKEN-763c42afb2d31eb7bc150da33402a24d0e081aef}" \
--env="CIRCLE_NODE_INDEX=${CIRCLE_NODE_INDEX-0}" \
--env="CIRCLE_NODE_TOTAL=${CIRCLE_NODE_TOTAL-1}" \
Expand Down
12 changes: 4 additions & 8 deletions build/deplicense.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,10 @@ function inspect() {
echo "unable to determine license"
}

# List the dependencies which are not part of the standard library
# (i.e. packages that contain a least one dot in the first component
# of their name).
pkgs=$(go list -f '{{range .Deps}}{{printf "%s\n" .}}{{end}}' ./... 2>/dev/null | \
sort -u | egrep '[^/]+\.[^/]+/')

# For each package, list the package directory and package root.
pkginfo=($(go list -f '{{.Dir}} {{.Root}}' ${pkgs} 2>/dev/null))
# For each dependency which is not part of the standard library, list the
# package directory and package root.
pkginfo=($(go list -f '{{ join .Deps "\n"}}' ./pkg/... | sort | uniq | \
xargs go list -f '{{if not .Standard}}{{.Dir}} {{.Root}}{{end}}'))

# Loop over the package info which comes in pairs in the pkginfo
# array.
Expand Down
6 changes: 3 additions & 3 deletions build/teamcity-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ set -exuo pipefail
# The blocking issue is https://github.com/golang/go/issues/14120; see
# https://github.com/golang/go/issues/10249 for some more concrete discussion
# on `stringer` and https://github.com/golang/go/issues/16086 for `vet`.
build/builder.sh make gotestdashi 2>&1
build/builder.sh make gotestdashi
build/builder.sh make check 2>&1 | go-test-teamcity
build/builder.sh go generate ./pkg/... 2>&1
build/builder.sh /bin/bash -c '! git status --porcelain | read || (git status; git diff -a; exit 1)' 2>&1
build/builder.sh go generate ./pkg/...
build/builder.sh /bin/bash -c '! git status --porcelain | read || (git status; git diff -a 1>&2; exit 1)'

# If the code is new enough to have go generate not
# run the ui tests, run the ui tests.
Expand Down

0 comments on commit 02ba2e2

Please sign in to comment.