From 999001746a87a937929e5e7c85e31203239475db Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Mon, 10 Aug 2015 06:37:54 -0400 Subject: [PATCH] Move vagrant activation to a parameter Closes #12611 --- TESTING.asciidoc | 18 +++++----- qa/pom.xml | 5 +++ qa/vagrant/pom.xml | 36 +++---------------- .../src/dev/ant/vagrant-integration-tests.xml | 33 ++++++++++++++++- 4 files changed, 50 insertions(+), 42 deletions(-) diff --git a/TESTING.asciidoc b/TESTING.asciidoc index 5cd8d9e8c53..2a480c57676 100644 --- a/TESTING.asciidoc +++ b/TESTING.asciidoc @@ -327,7 +327,7 @@ vagrant plugin install vagrant-cachier . Validate your installed dependencies: ------------------------------------- -mvn -Pvagrant -pl qa/vagrant validate +mvn -Dtests.vagrant -pl qa/vagrant validate ------------------------------------- . Download the VMs. Since Maven or ant or something eats the progress reports @@ -350,22 +350,22 @@ done . Smoke test the maven/ant dance that we use to get vagrant involved in integration testing is working: --------------------------------------------- -mvn -Pvagrant,smoke-vms -pl qa/vagrant verify +mvn -Dtests.vagrant -Psmoke-vms -pl qa/vagrant verify --------------------------------------------- or this to validate all the VMs: ------------------------------------------------- -mvn -Pvagrant,smoke-vms,all -pl qa/vagrant verify +mvn -Dtests.vagrant=all -Psmoke-vms -pl qa/vagrant verify ------------------------------------------------- That will start up the VMs and then immediate quit. . Finally run the tests. The fastest way to get this started is to run: ----------------------------------- mvn clean install -DskipTests -mvn -Pvagrant -pl qa/vagrant verify +mvn -Dtests.vagrant -pl qa/vagrant verify ----------------------------------- You could just run: -------------------- -mvn -Pvagrant verify +mvn -Dtests.vagrant verify -------------------- but that will run all the tests. Which is probably a good thing, but not always what you want. @@ -380,15 +380,15 @@ packaging and SyvVinit and systemd. You can control the boxes that are used for testing like so. Run just fedora-22 with: -------------------------------------------- -mvn -Pvagrant -pl qa/vagrant verify -DboxesToTest=fedora-22 +mvn -Dtests.vagrant -pl qa/vagrant verify -DboxesToTest=fedora-22 -------------------------------------------- or run wheezy and trusty: ------------------------------------------------------------------ -mvn -Pvagrant -pl qa/vagrant verify -DboxesToTest='wheezy, trusty' +mvn -Dtests.vagrant -pl qa/vagrant verify -DboxesToTest='wheezy, trusty' ------------------------------------------------------------------ or run all the boxes: --------------------------------------- -mvn -Pvagrant,all -pl qa/vagrant verify +mvn -Dtests.vagrant=all -pl qa/vagrant verify --------------------------------------- Its important to know that if you ctrl-c any of these `mvn` runs that you'll @@ -483,7 +483,7 @@ If you wanted to retest all the release artifacts on a single VM you could: # Build all the distributions fresh but skip recompiling elasticsearch: mvn -amd -pl distribution install -DskipTests # Copy them all the testroot -mvn -Pvagrant -pl qa/vagrant pre-integration-test +mvn -Dtests.vagrant -pl qa/vagrant pre-integration-test vagrant up trusty && vagrant ssh trusty cd $TESTROOT sudo ES_CLEAN_BEFORE_TEST=true bats $BATS/*.bats diff --git a/qa/pom.xml b/qa/pom.xml index 066f897bbe7..36f357841ed 100644 --- a/qa/pom.xml +++ b/qa/pom.xml @@ -152,6 +152,11 @@ vagrant + + + tests.vagrant + + vagrant diff --git a/qa/vagrant/pom.xml b/qa/vagrant/pom.xml index b5b2713aa77..db61969a469 100644 --- a/qa/vagrant/pom.xml +++ b/qa/vagrant/pom.xml @@ -23,15 +23,14 @@ precise, trusty, vivid, wheezy, jessie centos-6, centos-7, fedora-22, oel-7 - trusty - centos-7 + trusty + centos-7 - ${debBoxes} /usr/bin/rpmbuild @@ -140,7 +139,6 @@ - @@ -152,19 +150,6 @@ - - - - all - - ${allDebBoxes} - ${allRpmBoxes} - - @@ -210,7 +195,7 @@ - ${debBoxes}, ${rpmBoxes} + ok @@ -250,20 +235,7 @@ - ${debBoxes}, ${rpmBoxes} - - - - - set-boxes-to-test - - - !boxesToTest - - - - ${proposedBoxesToTest} + ok diff --git a/qa/vagrant/src/dev/ant/vagrant-integration-tests.xml b/qa/vagrant/src/dev/ant/vagrant-integration-tests.xml index 453a7957204..efed4960b5e 100644 --- a/qa/vagrant/src/dev/ant/vagrant-integration-tests.xml +++ b/qa/vagrant/src/dev/ant/vagrant-integration-tests.xml @@ -1,10 +1,41 @@ - + + + + + + + + + + + + + + + + + + + + + + +