From 6be7d0fa1ce16794d7be8b86bd443bd2debcd2d2 Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Wed, 3 Jul 2013 21:35:37 +0200 Subject: [PATCH 1/6] added config to run solr on travis --- .gitignore | 1 + .travis.yml | 7 +- testing-conf/schema.xml | 295 +++++++++++++++++++ testing-conf/solrconfig.xml | 546 ++++++++++++++++++++++++++++++++++++ travis.cfg | 21 ++ 5 files changed, 867 insertions(+), 3 deletions(-) create mode 100644 testing-conf/schema.xml create mode 100644 testing-conf/solrconfig.xml create mode 100644 travis.cfg diff --git a/.gitignore b/.gitignore index 45be59b..ee92498 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ var *.egg-info *.py[co] .*.cfg +/apache-solr-* diff --git a/.travis.yml b/.travis.yml index 186d035..632c67e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ python: - "2.6" - "2.7" install: - - python bootstrap.py - - bin/buildout -N -script: bin/alltests + - python bootstrap.py -c travis.cfg + - bin/buildout -N -c travis.cfg +before_script: curl https://raw.github.com/moliware/travis-solr/master/travis-solr.sh | SOLR_VERSION=3.6.2 SOLR_CONFS="testing-conf/schema.xml testing-conf/solrconfig.xml" SOLR_DOCS= bash +script: bin/test diff --git a/testing-conf/schema.xml b/testing-conf/schema.xml new file mode 100644 index 0000000..477e8ba --- /dev/null +++ b/testing-conf/schema.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UID + + + default + + + + + + + + + + + + diff --git a/testing-conf/solrconfig.xml b/testing-conf/solrconfig.xml new file mode 100644 index 0000000..93e01d4 --- /dev/null +++ b/testing-conf/solrconfig.xml @@ -0,0 +1,546 @@ + + + + + + + LUCENE_35 + + + + + + + + + + + + /Users/tom/VC/collective.solr/var/solr/data + + + + + + + 1000000000 + 1000 + native + + + + + + + false + 10 + 16 + true + true + + + 1 + 0 + + + + false + + + + + + + + + + + + + + 1024 + + + + + + + + + + + true + + + 10 + + + 100 + + + false + + + 4 + + + + + + + + + + + + + + + + explicit + 500 + + + + + + explicit + 500 + false + false + 1 + + + + spellcheck + + + + + + + + + + + + + + + + + + + + + tika_content + false + tika_ + + + + + + + + + + + + + + + + + search + solrpingquery + + + all + + + + + + + explicit + true + + + + + + + textSpell + + + default + default + spellchecker + .001 + true + + + + + + + + + + + + + + string + elevate.xml + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\"']{20,200} + + + + + + + ]]> + ]]> + + + + + + + + + + + + + + + + + + + + ,, + ,, + ,, + ,, + ,]]> + ]]> + + + + + + + + + + + 5 + + + + + *:* + + + + + diff --git a/travis.cfg b/travis.cfg new file mode 100644 index 0000000..8718507 --- /dev/null +++ b/travis.cfg @@ -0,0 +1,21 @@ +[buildout] +extends = + https://raw.github.com/collective/buildout.plonetest/master/travis-4.3.x.cfg +package-name = collective.solr +package-extras = [test] +parts += + test + +[test] +recipe = collective.xmltestreport +eggs = + collective.solr [test] + ${instance:eggs} + +[versions] +coverage = 3.4 +collective.xmltestreport = 1.2.6 +zc.buildout = 1.6.3 + +[sources] +collective.indexing = git git@github.com:plone/collective.indexing.git From ecd1a7eda7dd7433fab19232e0e03ac3bb4e7d05 Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Wed, 3 Jul 2013 21:41:28 +0200 Subject: [PATCH 2/6] add download cache for travis buildout --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 632c67e..ecbae82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ python: - "2.6" - "2.7" install: + - mkdir -p buildout-cache/downloads - python bootstrap.py -c travis.cfg - bin/buildout -N -c travis.cfg before_script: curl https://raw.github.com/moliware/travis-solr/master/travis-solr.sh | SOLR_VERSION=3.6.2 SOLR_CONFS="testing-conf/schema.xml testing-conf/solrconfig.xml" SOLR_DOCS= bash From 1684ecba7107b8e49bb0f91c64c24c99aa1e12fe Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Thu, 4 Jul 2013 05:49:50 +0200 Subject: [PATCH 3/6] check if solr is up before testing --- .travis.yml | 7 +++---- buildout/alltests.tmpl | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ecbae82..2ed68b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ python: - "2.7" install: - mkdir -p buildout-cache/downloads - - python bootstrap.py -c travis.cfg - - bin/buildout -N -c travis.cfg -before_script: curl https://raw.github.com/moliware/travis-solr/master/travis-solr.sh | SOLR_VERSION=3.6.2 SOLR_CONFS="testing-conf/schema.xml testing-conf/solrconfig.xml" SOLR_DOCS= bash -script: bin/test + - python bootstrap.py + - bin/buildout -N -t 10 +script: bin/alltests diff --git a/buildout/alltests.tmpl b/buildout/alltests.tmpl index 38702c9..662ca04 100755 --- a/buildout/alltests.tmpl +++ b/buildout/alltests.tmpl @@ -1,6 +1,19 @@ -#!/bin/bash +#!/usr/bin/env bash + +is_solr_up(){ + http_code=`echo $(curl -s -o /dev/null -w "%{http_code}" "http://localhost:8983/solr/admin/ping")` + return `test $http_code = "200"` +} + +wait_for_solr(){ + while ! is_solr_up; do + sleep 3 + done +} ${buildout:directory}/bin/solr-instance start +wait_for_solr() +echo 'Solr is up. Running tests ...' ${buildout:directory}/bin/test $* status=$? ${buildout:directory}/bin/solr-instance stop From dfe17fe66fca6e2a80e822a0ef53698bdc165623 Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Thu, 4 Jul 2013 06:13:33 +0200 Subject: [PATCH 4/6] use separate travis buildout and increase timeout --- .travis.yml | 4 ++-- travis.cfg | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2ed68b5..ddfce2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,6 @@ python: - "2.7" install: - mkdir -p buildout-cache/downloads - - python bootstrap.py - - bin/buildout -N -t 10 + - python bootstrap.py -c travis.cfg + - bin/buildout -N -t 20 -c travis.cfg script: bin/alltests diff --git a/travis.cfg b/travis.cfg index 8718507..6d2d3f4 100644 --- a/travis.cfg +++ b/travis.cfg @@ -1,10 +1,12 @@ [buildout] extends = - https://raw.github.com/collective/buildout.plonetest/master/travis-4.3.x.cfg + https://raw.github.com/collective/buildout.plonetest/master/travis-4.2.x.cfg + solr.cfg package-name = collective.solr package-extras = [test] parts += test + alltests [test] recipe = collective.xmltestreport @@ -12,10 +14,11 @@ eggs = collective.solr [test] ${instance:eggs} +[alltests] +recipe = collective.recipe.template +input = ${buildout:directory}/buildout/alltests.tmpl +output = ${buildout:directory}/bin/alltests + [versions] -coverage = 3.4 collective.xmltestreport = 1.2.6 zc.buildout = 1.6.3 - -[sources] -collective.indexing = git git@github.com:plone/collective.indexing.git From a376c71ebda80dfd4bf64aaf2ae2d15dfe6472af Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Thu, 4 Jul 2013 06:28:36 +0200 Subject: [PATCH 5/6] fixed syntax error --- buildout/alltests.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildout/alltests.tmpl b/buildout/alltests.tmpl index 662ca04..adbac84 100755 --- a/buildout/alltests.tmpl +++ b/buildout/alltests.tmpl @@ -12,7 +12,7 @@ wait_for_solr(){ } ${buildout:directory}/bin/solr-instance start -wait_for_solr() +wait_for_solr echo 'Solr is up. Running tests ...' ${buildout:directory}/bin/test $* status=$? From e45a46133f792274269811bc49bb5283d77cb32a Mon Sep 17 00:00:00 2001 From: Tom Gross Date: Thu, 4 Jul 2013 06:45:45 +0200 Subject: [PATCH 6/6] cleanup --- .gitignore | 1 - testing-conf/schema.xml | 295 ------------------- testing-conf/solrconfig.xml | 546 ------------------------------------ 3 files changed, 842 deletions(-) delete mode 100644 testing-conf/schema.xml delete mode 100644 testing-conf/solrconfig.xml diff --git a/.gitignore b/.gitignore index ee92498..45be59b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ var *.egg-info *.py[co] .*.cfg -/apache-solr-* diff --git a/testing-conf/schema.xml b/testing-conf/schema.xml deleted file mode 100644 index 477e8ba..0000000 --- a/testing-conf/schema.xml +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - UID - - - default - - - - - - - - - - - - diff --git a/testing-conf/solrconfig.xml b/testing-conf/solrconfig.xml deleted file mode 100644 index 93e01d4..0000000 --- a/testing-conf/solrconfig.xml +++ /dev/null @@ -1,546 +0,0 @@ - - - - - - - LUCENE_35 - - - - - - - - - - - - /Users/tom/VC/collective.solr/var/solr/data - - - - - - - 1000000000 - 1000 - native - - - - - - - false - 10 - 16 - true - true - - - 1 - 0 - - - - false - - - - - - - - - - - - - - 1024 - - - - - - - - - - - true - - - 10 - - - 100 - - - false - - - 4 - - - - - - - - - - - - - - - - explicit - 500 - - - - - - explicit - 500 - false - false - 1 - - - - spellcheck - - - - - - - - - - - - - - - - - - - - - tika_content - false - tika_ - - - - - - - - - - - - - - - - - search - solrpingquery - - - all - - - - - - - explicit - true - - - - - - - textSpell - - - default - default - spellchecker - .001 - true - - - - - - - - - - - - - - string - elevate.xml - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\"']{20,200} - - - - - - - ]]> - ]]> - - - - - - - - - - - - - - - - - - - - ,, - ,, - ,, - ,, - ,]]> - ]]> - - - - - - - - - - - 5 - - - - - *:* - - - - -