Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added attempt to process .xml files as a phpunit configuration file
  • Loading branch information
gargoyle authored and meritt committed Nov 2, 2010
1 parent a525c59 commit c25fae8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Support/run_tests.rb
Expand Up @@ -6,8 +6,14 @@
require "#{ENV['TM_BUNDLE_SUPPORT']}/phpunit.rb"

file = ENV['TM_FILENAME']
infile = file

if infile =~ /\.xml$/
infile = "--configuration #{infile}"
end

dir = PHPUnit::Processor.is_remote? ? ENV['TM_DIRECTORY'].gsub(/#{ENV['LOCAL_PATH']}/,ENV["REMOTE_PATH"]) : ENV['TM_DIRECTORY']
cmd = "cd \"#{dir}\"; phpunit --log-junit /tmp/#{file}.xml #{file} > /dev/null; if [ -f /tmp/#{file}.xml ]; then cat /tmp/#{file}.xml; rm /tmp/#{file}.xml; fi;"
cmd = "cd \"#{dir}\"; phpunit --log-junit /tmp/#{file}.xml #{infile} > /dev/null; if [ -f /tmp/#{file}.xml ]; then cat /tmp/#{file}.xml; rm /tmp/#{file}.xml; fi;"
if PHPUnit::Processor.is_remote?
output = `ssh #{ENV['REMOTE_HOST']} "#{cmd}"`
else
Expand Down

0 comments on commit c25fae8

Please sign in to comment.