summaryrefslogtreecommitdiff
path: root/test/start-local-webservices.rb
blob: 66dea299f4444c6e854c39f4e437af8ed236602a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env ruby
require 'fileutils'

port = 5000
[ "opentox-compound", "opentox-feature" , "opentox-dataset" , "opentox-fminer" , "opentox-lazar" ].each do |component|
	ENV[component.upcase.gsub(/-/,'_')] = "http://localhost:#{port}/"
	Dir.chdir ENV['HOME'] + '/webservices/' + component
	Dir["test.sqlite3"].each { |f| FileUtils.rm_rf(f) }
	file = 'application.rb'
	pid = fork {`urxvt -title #{component} -e thin --debug --rackup config.ru start -p #{port} -e test`}
	Process.detach(pid)
	port += 1
end