Zfilipin has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/100375


Change subject: Make it possible to run tests on Cloudbees using PhantomJS
......................................................................

Make it possible to run tests on Cloudbees using PhantomJS

Change-Id: I66a0b51646cfa1c7cde43b3d9a9a4af0d93b74e6
---
M docs/job.md
M docs/template.md
M lib/mediawiki/selenium/env.rb
3 files changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/75/100375/1

diff --git a/docs/job.md b/docs/job.md
index 591fd92..5d595e4 100644
--- a/docs/job.md
+++ b/docs/job.md
@@ -11,16 +11,20 @@
 
 --
 
-    export BROWSER_LABEL=(label)
-    export MEDIAWIKI_URL=(url)
+    export MEDIAWIKI_USER=${MEDIAWIKI_USER}
+    export MEDIAWIKI_PASSWORD_VARIABLE=${MEDIAWIKI_PASSWORD_VARIABLE}
+
+    export BROWSER_LABEL=${BROWSER_LABEL}
+    export MEDIAWIKI_URL=http://${MEDIAWIKI_URL}/wiki/
 
     curl -s -o use-ruby 
https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
     RUBY_VERSION=2.0.0-p247 \
       source ./use-ruby
 
     gem install bundler --no-ri --no-rdoc
+    if [ -d "${FOLDER}" ]; then cd ${FOLDER}; fi
     bundle install
-    bundle exec cucumber
+    bundle exec ${BUNDLE_EXEC}
 
 --
 
diff --git a/docs/template.md b/docs/template.md
index 7958822..c704ae6 100644
--- a/docs/template.md
+++ b/docs/template.md
@@ -30,6 +30,7 @@
     - internet_explorer_8
     - internet_explorer_9
     - internet_explorer_10
+    - phantomjs
 
 ## bundle exec
 
diff --git a/lib/mediawiki/selenium/env.rb b/lib/mediawiki/selenium/env.rb
index 1d4f90d..e6a2f1a 100644
--- a/lib/mediawiki/selenium/env.rb
+++ b/lib/mediawiki/selenium/env.rb
@@ -27,7 +27,8 @@
   end
 end
 def environment
-  if ENV["BROWSER_LABEL"] and ENV["SAUCE_ONDEMAND_USERNAME"] and 
ENV["SAUCE_ONDEMAND_ACCESS_KEY"]
+  if ENV["BROWSER_LABEL"] and ENV["BROWSER_LABEL"] != "phantomjs" and
+      ENV["SAUCE_ONDEMAND_USERNAME"] and ENV["SAUCE_ONDEMAND_ACCESS_KEY"]
     :saucelabs
   else
     :local

-- 
To view, visit https://gerrit.wikimedia.org/r/100375
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66a0b51646cfa1c7cde43b3d9a9a4af0d93b74e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to