-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Policheck run on VSTS for ODL-master (#919)
* Policheck fixes * Add the cmd to run policheck * remove the RunPoliCheck.cmd * Adding the exclusion config for termId 211972 * create a Policheck subdir for each branch. * Add script to run policheck. * move policheck exclusion config out of tools (to images dir)
- Loading branch information
1 parent
6532d04
commit f80e6ee
Showing
8 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+48 Bytes
(100%)
test/FunctionalTests/Framework/Workspaces/Databases/Aruba.sql
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+2.16 KB
(100%)
test/FunctionalTests/Framework/Workspaces/Databases/Northwind.sql
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
param( | ||
[string]$BuildSourceDir, | ||
[string]$folderName, | ||
[string]$branchName, | ||
[string]$resultRoot, | ||
[string]$PoliCheckPath | ||
) | ||
|
||
# | ||
#Example: | ||
# RunPoliCheck.ps1 -BuildSourceDir "C:\BuildAgent\_work\32\s" | ||
# -folderName "src" | ||
# -branchName "odata.net-master" | ||
# -resultRoot "C:\Users\ODatabld\Documents\PoliCheck\LatestRunResult" | ||
# -PoliCheckPath "C:\Program Files (x86)\Microsoft\PoliCheck\" | ||
# | ||
|
||
$targetPath= "${BuildSourceDir}\${folderName}" | ||
Write-Output "targetPath: ${targetPath}" | ||
$result="${resultRoot}\${branchName}\poli_result_${folderName}.xml" | ||
|
||
cd "${PoliCheckPath}" | ||
|
||
.\Policheck.exe /F:$targetPath /T:9 /Sev:"1|2" /PE:2 /O:$result | ||
|
||
$FileContent = Get-Content $result | ||
$PassResult = Select-String -InputObject $FileContent -Pattern "<TermTbl />" | ||
|
||
If ($PassResult.Matches.Count -eq 0) { | ||
Write-Error "PoliCheck failed for target ${targetPath}. For details, please check this result file on build machine: ${result}: section <Result TotalOccurences=...>." | ||
exit 1 | ||
} | ||
|
||
Write-Output "PoliCheck pass for target ${targetPath}" |