lib/rbbt/util/cmd.rb in rbbt-util-5.28.10 vs lib/rbbt/util/cmd.rb in rbbt-util-5.28.11
- old
+ new
@@ -98,10 +98,11 @@
post = options.delete(:post)
log = options.delete(:log)
no_fail = options.delete(:no_fail)
no_fail = options.delete(:nofail) if no_fail.nil?
no_wait = options.delete(:no_wait)
+ xvfb = options.delete(:xvfb)
dont_close_in = options.delete(:dont_close_in)
log = true if log.nil?
@@ -113,9 +114,17 @@
cmd = tool
else
cmd = tool + ' ' + cmd
end
+ end
+
+ case xvfb
+ when TrueClass
+ cmd = "xvfb-run --server-args='-screen 0 1024x768x24' --auto-servernum #{cmd}"
+ when String
+ cmd = "xvfb-run --server-args='#{xvfb}' --auto-servernum --server-num=1 #{cmd}"
+ when String
end
if stderr == true
stderr = Log::HIGH
end