我正在编写一个 rakefile,需要同时针对多个测试 dll 运行 mstest。我需要它只运行一次 mstest,因为我只需要一个 TRX 文件。为了针对多个测试 dll 运行 mstest,我需要能够/testcontainer:some.test.dll
在同一命令中添加多个实例。这是我当前的 rake 任务:
task :tests do
testDlls = FileList.new("#{BUILD_PATH}/*.Specs.dll")
sh "#{MSTEST_PATH} /testcontainer:#{testDlls}"
end
例如,testDlls 有 test1.dll、test2.dll 和 test3.dll。上述任务输出:
c:\msbuild\msbuild.exe /testcontainer:test1.dll test2.dll test3.dll
我需要的是:
c:\msbuild\msbuild.exe /testcontainer:test1.dll /testcontainer:test2.dll /testcontainer:test3.dll
我怎样才能得到我想要的输出?