Permalink
Browse files

Fixes to rsync-uri approach.

  • Loading branch information...
1 parent 9df6bdc commit 4fde062d14af2c47edcd48baf795021e114f2c91 @lukemelia lukemelia committed Jan 1, 2010
@@ -22,7 +22,7 @@ Feature: Distributed runs
And the output should contain "1 steps failed"
And it should run on 2 remote slaves
- Scenario: Distribute runs (using named host, queue_host and rsync_host)
+ Scenario: Distribute runs (using named host, queue host and rsync uri)
Given Testjour is configured to run on this machine in a temp1 directory
And Testjour is configured to run on this machine in a temp2 directory
And Testjour is configured to use this machine as the queue host
@@ -43,7 +43,6 @@
testjour_path = File.expand_path(File.dirname(__FILE__) + "/../../../../bin/testjour")
cmd = "#{testjour_path} #{@args.join(" ")}"
# puts cmd
-
status, @stdout, @stderr = systemu(cmd)
@exit_code = status.exitstatus
# puts @stderr.to_s
@@ -124,9 +124,13 @@ def local_run_command
end
def testjour_uri
- user = Etc.getpwuid.name
- host = Testjour.socket_hostname
- "http://#{user}@#{host}" + File.expand_path(".")
+ if configuration.external_rsync_uri
+ "rsync://#{configuration.external_rsync_uri}"
+ else
+ user = Etc.getpwuid.name
+ host = Testjour.socket_hostname
+ "rsync://#{user}@#{host}" + File.expand_path(".")
+ end
end
def testjour_path
@@ -29,7 +29,7 @@ def in
end
def rsync_uri
- external_rsync_uri || (full_uri.user + "@" + full_uri.host + ":" + full_uri.path)
+ external_rsync_uri || "#{full_uri.user}#{'@' if full_uri.user}#{full_uri.host}:#{full_uri.path}"
end
def external_rsync_uri
@@ -148,6 +148,9 @@ def testjour_args
if @options[:create_mysql_db]
args_from_options << "--create-mysql-db"
end
+ if @options[:queue_host]
+ args_from_options << "--queue-host=#{@options[:queue_host]}"
+ end
return args_from_options
end

0 comments on commit 4fde062

Please sign in to comment.