Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Commit

Permalink
Update NUnit runner
Browse files Browse the repository at this point in the history
  • Loading branch information
phatboyg committed Nov 19, 2013
1 parent d34d62b commit abac692
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
8 changes: 4 additions & 4 deletions build_support/BuildUtils.rb
Expand Up @@ -17,7 +17,7 @@ def initialize(command, working_directory, framework, flags)
def run(assemblies)
assemblies.each do |assem|
file = File.expand_path("#{@working_directory}/#{assem}")
sh "#{@cmd} \"#{file}\""
Kernel::system("#{@cmd} \"#{file}\"")
end
end
end
Expand Down Expand Up @@ -63,7 +63,7 @@ def self.runProjFile(attributes)
targetsValue += " /t:#{target}"
end

sh "#{msbuildFile} #{projFile} #{targetsValue} #{switchesValue}"
Kernel::system("#{msbuildFile} #{projFile} #{targetsValue} #{switchesValue}")
end
end

Expand All @@ -76,7 +76,7 @@ def self.compile(attributes)
frameworkDir = File.join(ENV['windir'].dup, 'Microsoft.NET', 'Framework', 'v4.0.30319')
aspNetCompiler = File.join(frameworkDir, 'aspnet_compiler.exe')

sh "#{aspNetCompiler} -nologo -errorstack -c -p #{webPhysDir} -v #{webVirDir}"
Kernel::system("#{aspNetCompiler} -nologo -errorstack -c -p #{webPhysDir} -v #{webVirDir}")
end
end

Expand Down Expand Up @@ -109,4 +109,4 @@ def write(file)
file.puts erb.result(binding)
end
end
end
end
15 changes: 5 additions & 10 deletions rakefile.rb
Expand Up @@ -131,18 +131,13 @@ def copyOutputFiles(fromDir, filePattern, outDir)
}
end

task :tests => [:unit_tests]

desc "Runs unit tests (integration tests?, acceptance-tests?) etc."
task :unit_tests => [:compile] do
Dir.mkdir props[:artifacts] unless exists?(props[:artifacts])
desc "Runs unit tests"
nunit :tests => [:compile] do |nunit|

runner = NUnitRunner.new(File.join('src', 'packages', 'nunit.Runners.2.6.3', 'tools', "nunit-console#{(BUILD_PLATFORM.empty? ? '' : "-#{BUILD_PLATFORM}")}.exe"),
'tests',
TARGET_FRAMEWORK_VERSION,
['/nothread', '/nologo', '/labels', "\"/xml=#{File.join(props[:artifacts], 'nunit-test-results.xml')}\""])

runner.run ['Magnum.Specs'].map{ |assem| "#{assem}.dll" }
nunit.command = File.join('src', 'packages','NUnit.Runners.2.6.3', 'tools', 'nunit-console.exe')
nunit.options = "/framework=#{CLR_TOOLS_VERSION}", '/nothread', '/nologo', '/labels', "\"/xml=#{File.join(props[:artifacts], 'nunit-test-results.xml')}\""
nunit.assemblies = FileList[File.join("tests", "Magnum.Specs.dll")]
end

desc "Target used for the CI server. It both builds, tests and packages."
Expand Down

0 comments on commit abac692

Please sign in to comment.