This project is read-only.

Build failed (due to Unit test, compilation is ok) but package is done

Feb 18, 2015 at 4:44 PM
thanks for this good project,

all is in title, i have unit test, compilation is ok, unit test failed (i configure build to fail on unit test error), but package is done

i use simple template (not tfsversionning)

A config key ? a workaround ?

ps : sorry for my bad english
Feb 26, 2015 at 11:28 AM
Edited Feb 26, 2015 at 11:29 AM
workaround not very clean but it's work:
powershel pre-package script :

$colUri = "http://srv:8080/tfs/CollectionName"
$teamProject = "teamProjectName"
$BuildName = "buildName"
 $server = new-object Microsoft.TeamFoundation.Client.TfsTeamProjectCollection(New-Object Uri($colUri))
 $buildServer = $server.GetService([Microsoft.TeamFoundation.Build.Client.IBuildServer])
  $BuildDetail = $buildServer.QueryBuilds($teamProject, $BuildName) | sort -desc StartTime | select -first 1
if ($BuildDetail.TestStatus -eq "Failed")
    Get-ChildItem -Path $tfsDropFolder -Include *.* -File -Recurse | foreach { $_.Delete()}