Commit Graph

124 Commits

Author SHA1 Message Date
Ryan Ernst d68c6673a2 Build: Cleanup precommit task gradle code
This change attempts to simplify the gradle tasks for precommit. One
major part of that is using a "less groovy style", as well as being more
consistent about how tasks are created and where they are configured. It
also allows the things creating the tasks to set up inter task
dependencies, instead of assuming them (ie decoupling from tasks
eleswhere in the build).
2015-12-01 22:36:54 -08:00
Ryan Ernst fcb6f44acf Build: Add ability to specify the compact profile for javac 2015-12-01 11:04:46 -08:00
Robert Muir f7e7a6bfad compile against compact3 profile 2015-12-01 09:40:54 -05:00
Ryan Ernst 4bb1eed766 Build: Increase the number of failed tests shown in test summary
We had increased this in maven, but it was lost in the transition to
gradle. This change adds it as a configurable setting the the logger for
randomized testing and bumps it to 25.
2015-11-30 13:40:39 -08:00
Ryan Ernst 0fa05edf03 Build: Improve output when integ test fails
This outputs a lot more info when integ tests fail to start, as well as
(should) fix windows (at least in my VM run) integ tests.
2015-11-29 19:44:43 -08:00
Robert Muir 93758874fb Merge pull request #15093 from rmuir/gradle_windoze_integ_tests
Fix integration tests and 'gradle run' to work on windoze
2015-11-29 12:15:30 -05:00
Robert Muir a01f86aaac Fix integration tests and gradle run to work on windoze 2015-11-29 07:39:18 -08:00
Ryan Ernst 8e25dc4f80 Merge pull request #15089 from rjernst/extra_config_file_delay
Fix delayed extra config file checks to be right before copy
2015-11-28 19:44:16 -08:00
Ryan Ernst 018c766bf7 Build: Fix delayed extra config file checks to be right before copy
The current delay waits until later after normal configuration, but
still just after resolution (ie when paths would be known for
dependencies but not actual execution). This delays the checks further
to be done right before we actually execute the copy task.

closes #15068
2015-11-28 18:06:36 -08:00
Ryan Ernst 1ee59e4977 Merge pull request #15088 from rjernst/integ_test_command_line
Move debug options setting to before command line is logged
2015-11-28 17:19:39 -08:00
Ryan Ernst f15ee9fa54 Build: Move debug options setting to before command line is logged
Currently if running with --info, the command line for ES, along with
env vars, are logged before they may be ammended to add debug options.
This moves the adding JAVA_OPTS to before we print the command.
2015-11-28 17:05:11 -08:00
Nik Everett eba594fc08 Remove strange checks and clean dirs 2015-11-28 19:44:53 -05:00
Nik Everett 45e71329ee [build] Fix deb and rpm tests
Gradle is causing so much trouble here! Its too cute for its own good.
2015-11-28 19:07:06 -05:00
Robert Muir 66ae46ef8b Give enough ram so javac won't OOM
Today its based on the automatic -Xmx, but this
will fail in some environments (e.g. vagrant).
2015-11-26 02:16:46 -07:00
Ryan Ernst 139d688e24 Merge pull request #14996 from rjernst/logged_exec
Add wrapper around gradle Exec task for easier logging
2015-11-25 11:26:30 -08:00
Ryan Ernst bcb4be322f Build: Add wrapper around gradle Exec task for easier logging
The Exec task outputs stdout/stderr to the standard streams by default.
However, to keep output short, we currently capture this, and only
output if the task failed. This change makes a small wrapper around Exec
to facilitate this behavior anywhere we use Exec.
2015-11-25 11:26:02 -08:00
Ryan Ernst 52f31ee14a Build: Allow extra config for integ test to be anything project.file() accepts
This change delays the lookup for whatever is passed to extra config as
the source file to happen at execution time. This allows using eg a task
which generates a file, but maintains the checks that the file is not a
dir and that it exists at runtime.
2015-11-25 00:34:56 -08:00
Ryan Ernst d6969fcf3a Build: Split extra config files for integ test into separate task
This doesn't work when there are no extra config files, since gradle
sees the copy task and says "there is nothing to do".
2015-11-24 16:37:32 -08:00
Ryan Ernst 84d6cbd32a Build: Fix extra config to create a file, not a directory for the destination file
Also added some checks to catch misconfiguration (dir or non existing file).
2015-11-24 16:09:47 -08:00
Ryan Ernst 7b0a0ce0d9 Build: Add ability to specify extra configuration files for integ test
This change allows copy extra files into the integ test cluster before
it runs. However, it explicitly forbids overwriting elasticsearch.yml,
since that is generated.
2015-11-24 15:19:51 -08:00
Ryan Ernst 3a77d993fd Build: Copy rest specs for plugins that are added to integ test cluster
This change allows having rest tests using the api spec of plugins that
the rest test is testing against.
2015-11-24 14:34:21 -08:00
Ryan Ernst 1e0f929281 Build: Simplify adding plugins that are another project in the build
The current mechanism for adding plugins to the integTest cluster is to
have a FileCollection. This works well for the integTests for a single
plugin, which automatically adds itself to be installed. However, for qa
tests where many plugins may be installed, and from other projects, it
is cumbersome to add configurations, dependencies and dependsOn
statements over and over. This simplifies installing a plugin from
another project by moving this common setup into the cluster
configuration code.
2015-11-24 12:53:11 -08:00
Ryan Ernst f0e780bf86 Merge pull request #14959 from rjernst/cluster_waiting
Allow customizing wait condition and cluster settings
2015-11-24 08:24:00 -08:00
Ryan Ernst 647f324c46 Change waitfor max time back to 30 seconds, in case jenkins is slow 2015-11-24 08:23:16 -08:00
Ryan Ernst af496f5e7f Merge pull request #14925 from rjernst/maven_test_parity
Add back leaveTemporary and ifNoTests
2015-11-24 00:53:25 -08:00
Ryan Ernst 31b7e91e5a Build: Allow customizing wait condition and cluster settings
The current wait condition for an integ test cluster being up is a
simple http get on the root path for elasticsearch. However, it is
useful to allow having arbitrary wait conditions. This change reworks
the wait task to first check that each node process started successfully
and has a socket up, followed by an arbitrary wait condition which
defaults to the current http get.

Also, cluster settings are allowed to be added, and overriden. Finally,
custom setup commands are made relative to the elasticsearch home dir
for each node.
2015-11-24 00:48:58 -08:00
Ryan Ernst 529e442e2a Merge branch 'master' into attach_without_subdir 2015-11-23 15:01:55 -08:00
Ryan Ernst 5a62282150 Build: Rework extra plugins support to be through sibling directories
This change removes the subdirectory support for extra-plugins, and
replaces it with an iteration of sibling directories with the prefix
"extra-plugin-".
2015-11-23 14:15:45 -08:00
Michael McCandless e13b0d4bde upgrade lucene to 5.4.0-snapshot-1715952 2015-11-23 17:13:49 -05:00
Ryan Ernst 503d836ee4 Build: Add back leaveTemporary and ifNoTests
This change adds back the last of the missing test options to the juni4
wrapper. leaveTemporary is important in that setting it to true (which
is how we had it set in maven) removes the warnings we currently get
about a leftover file that cannot be deleted (from jna).
2015-11-22 22:18:42 -08:00
Ryan Ernst 7d3da7e6ee Build: Get multi node smoke tests working
This change adds back the multi node smoke test, as well as making the
cluster formation for any test allow multiple nodes. The main changes in
cluster formation are abstracting out the node specific configuration to
a helper struct, as well as making a single wait task that waits for all
nodes after their start tasks have run. The output on failure was also
improved to log which node's info is being printed.
2015-11-22 14:49:05 -08:00
Robert Muir 30529c008d Ban write access to system properties
* Forbid System.setProperties & co in forbidden APIs.
* Ban property write access at runtime with security manager.

Plugins that need to modify system properties will need to request permission in their plugin-security.policy
2015-11-21 22:33:06 -05:00
Ryan Ernst a2ef228d12 Build: Add precommit checks to standalone tests 2015-11-21 11:50:43 -08:00
Nik Everett 9b6e59bd57 [build] Survive missing directories 2015-11-20 17:38:50 -05:00
Ryan Ernst 61d62078f5 Merge pull request #14779 from rjernst/fork_compile
Use JDK at JAVA_HOME for compiling/testing, and improve build info output
2015-11-20 12:12:49 -08:00
Ryan Ernst df9cd96e9f Merge pull request #14858 from rjernst/check_jarhell
Add jar hell check before tests run
2015-11-20 11:35:49 -08:00
Ryan Ernst 6b734dc009 Remove debugging output from running jjs scripts 2015-11-20 11:31:46 -08:00
Ryan Ernst 63a7b155d8 Merge branch 'master' into fork_compile 2015-11-20 11:30:36 -08:00
Ryan Ernst c650d31ef1 Build: Improve integ test startup behavior
As part of the refactoring to allow --debug-jvm with gradle run, the way
java options are passed for integ tests was changed. However, we need to
make sure the jvm argline passed goes to ES_GC_OPTS because this
allows overriding things like which garbage collector we run, which we
do for testing from jenkins. This change adds back ES_GC_OPTS.
2015-11-19 13:06:47 -08:00
Ryan Ernst 1952b06cfe Merge pull request #14854 from rjernst/trick_ant
Fix integTest output if the elasticsearch script fails
2015-11-19 12:03:03 -08:00
Ryan Ernst e832fc6000 Make tmp file handling for jjs scripts better 2015-11-19 11:24:31 -08:00
Ryan Ernst d1a27aed16 Make the tmp file created for jjs scripts be deleted when gradle exits 2015-11-19 10:33:31 -08:00
Ryan Ernst c93f074183 Merge branch 'master' into fork_compile 2015-11-19 10:26:06 -08:00
Ryan Ernst 0e8958d1e8 Fix jarhell marker to be written on info logging, and document how the
marker file works.
2015-11-19 10:21:25 -08:00
Ryan Ernst fce0052fd9 Build: Add jar hell check before tests run
Because jar hell checks run during static initialization of tests, a
failure will result in all tests failing. However, only the first test
within each jvm shows the jarhell failure, and later tests get a class
not found exception for the class that failed to load when static init
failed.

This change adds a task to run as part of precommit, which checks the
test runtime classpath for jarhell.

closes #14721
2015-11-19 02:07:15 -08:00
Ryan Ernst d44dbd4757 Build: Fix integTest output if the elasticsearch script fails
If there is a failure in the elasticsearch start script, we currently
completely lose the failure. This is due to how spawning works with ant.
This change avoids the issue by introducing an intermediate script,
built dynamically before running ant exec, which runs elasticsearch and
redirects the output to a log file. This essentially causes us to run
elasticsearch in the foreground and capture the output, but at the same
time keep a running script which ant can pump streams from (which will
always be empty).
2015-11-18 23:30:33 -08:00
Ryan Ernst c273327246 Build: Improve test output on errors and when debugging
There were a number of subtle issues with the existing logging that
wraps events from Junit4 and ant. This change:
* Tweaks at what level certain events are logged
* Fixes -Dtests.output=always to force everything to be logged
* Makes -Dtests.class imply -Dtests.output=always
* Captures ant logging from junit4, so that direct jvm output will be
  logged on failure when not using gradle info logging
2015-11-18 16:36:07 -08:00
Nik Everett 8ffb63a177 Merge pull request #14718 from nik9000/gradle_deb
Get packaging working in gradle
2015-11-18 14:17:11 -05:00
Nik Everett 9b0a47d8e3 Fix rpm and deb distributions
and test them with vagrant
2015-11-18 14:16:42 -05:00
Nik Everett 19919a53a5 [build] Log launch command before starting ES 2015-11-18 12:25:27 -05:00