Граф коммитов

147 Коммитов

Автор SHA1 Сообщение Дата
Alexander Morozov d17f2baa81 Merge pull request #12646 from duglin/validateTests
Validate we're not using the old testing stuff
2015-04-23 11:23:20 -07:00
Tianon Gravi 929af4c38d Fix daemon start/stop logic in hack/make/* scripts
From the Bash manual's `set -e` description:
(https://www.gnu.org/software/bash/manual/bashref.html#index-set)

> Exit immediately if a pipeline (see Pipelines), which may consist of a
> single simple command (see Simple Commands), a list (see Lists), or a
> compound command (see Compound Commands) returns a non-zero status.
> The shell does not exit if the command that fails is part of the
> command list immediately following a while or until keyword, part of
> the test in an if statement, part of any command executed in a && or
> || list except the command following the final && or ||, any command
> in a pipeline but the last, or if the command’s return status is being
> inverted with !. If a compound command other than a subshell returns a
> non-zero status because a command failed while -e was being ignored,
> the shell does not exit.

Additionally, further down:

> If a compound command or shell function executes in a context where -e
> is being ignored, none of the commands executed within the compound
> command or function body will be affected by the -e setting, even if
> -e is set and a command returns a failure status. If a compound
> command or shell function sets -e while executing in a context where
> -e is ignored, that setting will not have any effect until the
> compound command or the command containing the function call
> completes.

Thus, the only way to have our `.integration-daemon-stop` script
actually run appropriately to clean up our daemon on test/script failure
is to use `trap ... EXIT`, which we traditionally avoid because it does
not have any stacking capabilities, but in this case is a reasonable
compromise because it's going to be the only script using it (for now,
at least; we can evaluate more complex solutions in the future if they
actually become necessary).

The alternatives were much less reasonable.  One is to have the entire
complex chains in any script wanting to use `.integration-daemon-start`
/ `.integration-daemon-stop` be chained together with `&&` in an `if`
block, which is untenable.  The other I could think of was taking the
body of these scripts out into separate scripts, essentially meaning
we'd need two files for each of these, which further complicates the
maintenance.

Add to that the fact that our `trap ... EXIT` is scoped to the enclosing
subshell (`( ... )`) and we're in even more reasonable territory with
this pattern.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-04-23 11:31:16 -06:00
Doug Davis ecccfa82aa Validate we're not using the old testing stuff
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-23 10:29:47 -07:00
Jessie Frazelle e3e1c2be42 Merge pull request #12376 from Mic92/refactor-hack
Refactor shellscripts
2015-04-22 12:12:44 -07:00
Jörg Thalheim 6533cb973f hack/make/test-integration-cli: introduce MAKEDIR variable
- every execution of dirname costs time
- less repeating

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-15 10:44:14 +02:00
Jörg Thalheim ac20568b0a hack: quote all parameters with variable interpolation
better safe then sorry. especially for rm

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-15 10:14:14 +02:00
Tatsushi Inagaki bcd5e20a09 Enable "netgo" library when we build a static binary with gccgo
Signed-off-by: Tatsushi Inagaki <e29253@jp.ibm.com>
2015-04-13 21:33:04 -04:00
Michael Crosby 8652ca5d5f Merge pull request #12111 from tianon/builder-deb
Add "builder-deb" base images for building ".deb" packages properly
2015-04-13 13:41:17 -07:00
Jessica Frazelle f3ba0a6a35 change tabs to spaces
Signed-off-by: Jessica Frazelle <jess@docker.com>
2015-04-13 12:48:40 -07:00
bobby abbott 3280ce651b Adds validate-vet script
resolves #11970

Signed-off-by: bobby abbott <ttobbaybbob@gmail.com>
2015-04-13 12:48:05 -07:00
Eric Windisch 67a983fc37 Use HTTPS for package URL
Signed-off-by: Eric Windisch <eric@windisch.us>
2015-04-11 13:21:16 -04:00
Tianon Gravi eee1efcfd6 Add "builder-deb" base images for building ".deb" packages properly
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-04-06 10:43:36 -06:00
Johan Euphrosine 5846914f91 test-unit: fix TESTFLAGS doc
Signed-off-by: Johan Euphrosine <proppy@google.com>
2015-04-03 15:05:14 -07:00
Vincent Batts 7617ec176d .: remove trailing white spaces
blame tibor this one ;-)
```
find . -type f -not -name '*.png' -not -name '*.go' -not -name '*.md'
-not -name '*.tar' -not -name '*.pem' -not -path './vendor/*' -not -path
'./.git/*' -not -path '*/testdata/*' -not -path './docs/*images*' -not
-path '*/testfiles/*' -not -path './bundles/*' -not -path
'./docs/*static*/*' -not -path './docs/*article-img/*' -exec grep -HnEl
'[[:space:]]$' {} \; | xargs sed -iE 's/[[:space:]]*$//'
```

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-03-25 13:38:17 -04:00
Tibor Vass 0252ad0adc Revert "Dealing with trailing whitespaces"
The validation script from #10681 is too pedantic, and does not handle
well situations like:

```
cat <<EOF   # or <<-EOF
	Whether the leading whitespace is stripped out or not by bash
	it should still be considered as valid.
EOF
```

This reverts commit 4e65c1c319.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-03-25 10:04:56 -06:00
Arnaud Porterie 322095ed63 Merge pull request #10681 from noironetworks/whitespaces-cleaner
Removed all trailing whitespaces from every text file
2015-03-24 16:02:14 -07:00
Tianon Gravi ae61593417 Fix several very minor consistency issues
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-03-17 23:01:40 -06:00
André Martins 4e65c1c319 Dealing with trailing whitespaces
Created a validation that detects all trailing whitespaces from every
text file that isn't *.go, *.md, vendor/*,
docs/theme/mkdocs/tipuesearch*

Removed trailing whitespaces from every text file except from vendor/*
builder/parser/testfiles*, docs/theme/mkdocs/tipuesearch* and *.md

Signed-off-by: André Martins <martins@noironetworks.com>
2015-03-17 03:34:01 +00:00
Srini Brahmaroutu ec92e84b85 Build docker with gccgo, requires host to contain gccgo 5.0
Addresses #9207
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-03-16 22:38:26 +00:00
Tianon Gravi 793ebba3d6 Enforce our use of the explicitly frozen images
This requires that any environment where we wish to run the integration-cli tests includes both the `Dockerfile` and `curl`, which has been deemed an appropriate and acceptable trade-off.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-03-16 14:42:59 -06:00
Derek McGowan 636037c363 Fix test pull verified
Update pull code to consider any layer download or new tag as an update.
Update hello-world frozen image to be explicitly tagged as frozen, to not interfere with pull tests.  The hello-world is used by pull tests because of its small size and there is no other official image with such a size.

fixes #11383

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-03-16 12:22:00 -07:00
Tianon Gravi 949a21b55f Move scripts back to hack/, leave docs in project/
This also removes the now-defunct `*maintainer*.sh` scripts that don't work with the new TOML format, and moves a couple not-build-or-release-related scripts to `contrib/` instead.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2015-03-13 14:04:08 -06:00
Solomon Hykes 32e61b8f5c Move 'hack' to the less confusing 'project'
We might want to break it up into smaller pieces (eg. tools in one
place, documents in another) but let's worry about that later.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-11-09 21:50:28 +00:00
Yohei Ueda dad58737ae Export envvars necessary for unit-test
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-07 16:54:25 +09:00
Yohei Ueda 5bd5ef5a0a Make test-unit runnable without parallel
Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
2014-11-07 02:40:13 +09:00
Jessica Frazelle 7041eb00be Revert "finally, use code generation for INITSHA1 & INITPATH too"
This reverts commit c7c620dd9f.

Conflicts:
	.gitignore
	hack/make.sh
	hack/make/dynbinary

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-28 16:29:01 -07:00
Jessica Frazelle 17e0a15386 Revert "Use code generation to set IAMSTATIC instead of -X"
This reverts commit 3e10b93106.

Conflicts:
	.gitignore
	hack/make.sh
	hack/make/dynbinary

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-10-28 16:25:50 -07:00
Michael Hudson-Doyle c7c620dd9f finally, use code generation for INITSHA1 & INITPATH too
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
2014-10-24 11:01:19 +13:00
Michael Hudson-Doyle 3e10b93106 Use code generation to set IAMSTATIC instead of -X
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
2014-10-24 10:56:51 +13:00
Tianon Gravi 8ffdf6022e Move the body of go_compile_test_dir into a file since GNU Parallel breaks on sourcing exported Bash functions thanks to the shellshock fixes
Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-09-28 21:51:44 -06:00
Erik Hollensbe aa129b356f hack: TIMEOUT (for controlling test timeout) and forwarding of
BUILDFLAGS to binary/dynbinary.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-25 14:25:43 -07:00
unclejack 6db078dea7 Merge pull request #7191 from tiborvass/test-daemon
Add Daemon restart test along with Daemon utils
2014-09-02 22:40:23 +03:00
Erik Hollensbe 9a2d4e9273 hack/make: fix test-unit target to propogate TESTFLAGS properly
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-09-02 12:10:47 -07:00
Tibor Vass 054b921a2c Add Daemon test utils
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-09-02 10:58:36 -07:00
Tianon Gravi ba663eac3a Adjust build tags to be client-only in "make cross" too
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-08-04 15:05:12 -06:00
Tibor Vass 4909a70204 Accept vanilla Linux Foundation signoffs
This allows signing off commits with `git commit -s`

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)

Cleaned up DCO regex
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-08-01 19:30:34 -04:00
Tianon Gravi 3a14eb066c Fix more instances of "dotcloud/docker" in hack/ (and add a DOCKER_PKG environment variable to simplify references to our "package path" in our bundlescripts)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-30 17:02:04 -06:00
Tibor Vass 4cfe806db2 Kill all concurrent jobs on error
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-26 13:45:35 -04:00
Tianon Gravi 0a7cd70924 Fix precompiled unit tests needing their "testdata" contents
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-26 11:46:52 -04:00
Tianon Gravi a6085fd430 Add a bunch more tweaks to the parallel test compilation
- put all the precompiled test binaries in $DEST so they show up in bundles and can be re-run individually afterwards
- support cases where parallel is not installed (when using dyntest-unit, for example, this is much more common, since it's designed to be run outside the Dockerfile)
- use "mktemp -d" instead of "/tmp" directly for our temporary parallel HOME
- update the default PARALLEL_JOBS to be the value of "nproc" instead of 0, since "0 means as many as possible" (see https://www.gnu.org/software/parallel/man.html#jobs_n)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-26 11:46:36 -04:00
Tibor Vass 158e3068bd compile unit tests in parallel with GNU parallel
Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
2014-07-26 11:46:36 -04:00
Victor Vieux b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Tianon Gravi ff08357c9b Fix hack/make/ubuntu to install both docker.service and docker.socket
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-16 23:03:32 -06:00
Tianon Gravi bbbf642427 Fix DCO parsing for numeric github handles like cpuguy83
Turns out, "alphanumeric" actually means both "alpha" AND "numeric". Dur.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-07 09:57:50 -06:00
Tianon Gravi e895817ad7 Update the Travis GitHub username regex to match the GitHub username requirements
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-07 08:36:31 -06:00
SvenDowideit fa29b1f062 I'm going to wish I didn't do this
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-07-03 10:31:56 +10:00
Matthew Heon fa3ac2d370 Fixed manpage generation script and README
Update md2man script to generate manpages inside docs/man/ directory. Update
usage documentation in the readme to point to the new docs/man path. Update
Ubuntu makefile to use new path to manpages

Docker-DCO-1.1-Signed-off-by: Matthew Heon <mheon@redhat.com> (github: mheon)
2014-06-26 15:51:26 -04:00
SvenDowideit 42be6f2957 move the man pages to the docs/ dir
Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
2014-06-24 13:07:42 +10:00
Tianon Gravi 506ad22743 Merge pull request #6553 from tianon/disable-netgo-for-dynbinary
Disable netgo for dynbinary builds
2014-06-20 17:51:12 -06:00
Tianon Gravi 986a151b8a Fix dyntest and rename it to dyntest-unit to match the test-unit rename
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-06-19 15:06:34 -06:00