[Git][noosfero/noosfero][master] Set resolution for xvfb-run

Bráulio Bhavamitra gitlab at mg.gitlab.com
Sat Mar 12 12:22:18 BRT 2016


Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero


Commits:
85f6dcca by Braulio Bhavamitra at 2016-03-12T12:21:00-03:00
Set resolution for xvfb-run

This avoid unexpected failures with different environments defaults

- - - - -


3 changed files:

- lib/tasks/ci.rake
- lib/tasks/plugins_tests.rake
- lib/tasks/selenium.rake


Changes:

=====================================
lib/tasks/ci.rake
=====================================
--- a/lib/tasks/ci.rake
+++ b/lib/tasks/ci.rake
@@ -57,7 +57,8 @@ namespace :ci do
 
     sh 'ruby', '-Itest', *tests unless tests.empty?
     sh 'cucumber', *features unless features.empty?
-    sh 'xvfb-run', '-a', 'cucumber', '-p', 'selenium', *features unless features.empty?
+    sh 'xvfb-run', '-a', '--server-args="-screen 0, 1280x1024x24"',
+      'cucumber', '-p', 'selenium', *features unless features.empty?
 
     changed_plugins.each do |plugin|
       if $broken_plugins.include?(plugin)


=====================================
lib/tasks/plugins_tests.rake
=====================================
--- a/lib/tasks/plugins_tests.rake
+++ b/lib/tasks/plugins_tests.rake
@@ -116,7 +116,8 @@ def run_minitest files
 end
 
 def run_cucumber(profile, files)
-  sh 'xvfb-run', '-a', 'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files
+  sh 'xvfb-run', '-a', '--server-args="-screen 0, 1280x1024x24"',
+    'ruby', '-S', 'cucumber', '--profile', profile.to_s, '--format', ENV['CUCUMBER_FORMAT'] || 'progress' , *files
 end
 
 def custom_run(name, files, run=:all)


=====================================
lib/tasks/selenium.rake
=====================================
--- a/lib/tasks/selenium.rake
+++ b/lib/tasks/selenium.rake
@@ -1,5 +1,5 @@
 desc 'Runs Seleniun acceptance tests'
 task :selenium do
   puts "Firefox version = #{`firefox --version`}"
-  sh "xvfb-run -a cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
+  sh "xvfb-run -a --server-args=\"-screen 0, 1280x1024x24\" cucumber -p selenium --format #{ENV['CUCUMBER_FORMAT'] || 'progress'}"
 end



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/85f6dccae771dc4144dd901a2f462639321647cd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160312/e5bdb2d1/attachment.html>


More information about the Noosfero-dev mailing list