Skip to content

Commit

Permalink
Merge pull request #121 from Microsoft/staging
Browse files Browse the repository at this point in the history
Update to 2.0.66.0
  • Loading branch information
JiajunW authored Aug 18, 2017
2 parents 3862796 + 6e28add commit 349fa1f
Show file tree
Hide file tree
Showing 497 changed files with 1,383 additions and 762 deletions.
2 changes: 1 addition & 1 deletion AssemblyInfo/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
using System.Reflection;

[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.0.66.0")]
51 changes: 43 additions & 8 deletions InstallPrerequisites/InstallPrerequisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ Function CheckIfNet4IsInstalled{

# Check if application is installed on current machine.
Function CheckIfAppInstalled{
Param ([string]$AppName)
Param (
[string]$AppName, # Application Name
[string]$Version, # Application Version
[bool]$Compatible # Is support backward compatible
)

#check if the required software is installed on current machine
if ([IntPtr]::Size -eq 4) {
Expand All @@ -97,11 +101,24 @@ Function CheckIfAppInstalled{
'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
)
}
$app = Get-ItemProperty $regpath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ } }} | Where-Object {$_.DisplayName.Contains($AppName)} | Select DisplayName

$app = Get-ItemProperty $regpath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ } }} | Where-Object {$_.DisplayName -match $AppName} | Select DisplayName, DisplayVersion -First 1

if($app){
return $true;
if($Compatible){
return ([System.Version]$app.DisplayVersion -ge [System.Version]$Version);
}else{
return ([System.Version]$app.DisplayVersion -eq [System.Version]$Version);
}
}else{
return $false;
if($AppName -match "Microsoft Agents for Visual Studio"){
#If Test Agent was not installed we also need check if Visual Studio installed.
$app = Get-ItemProperty $regpath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ } }} | Where-Object {$_.DisplayName -match "Microsoft Visual Studio \d{4} Devenv"} | Sort-Object -Property DisplayVersion -Descending | Select DisplayName, Version, DisplayVersion -First 1
if($app){
return $true;
}
}
return $false;
}
}

Expand Down Expand Up @@ -165,7 +182,7 @@ Function GetDownloadTools{
Write-Host "Get information of all the Prerequisite tools from Configure file"
foreach($item in $toolXML.Dependency.tools.tool)
{
$tool = '' | select Name,FileName,AppName,Version,URL,Arguments,InstallFileName,NeedRestart
$tool = '' | select Name,FileName,AppName,Version,URL,Arguments,InstallFileName,NeedRestart,BackwardCompatible

$tool.Name = $item.name;
$tool.FileName = $item.FileName;
Expand All @@ -174,9 +191,15 @@ Function GetDownloadTools{
$tool.URL = $item.url;
$tool.InstallFileName = $item.InstallFileName;
$tool.NeedRestart = $false
$tool.BackwardCompatible = $true

if($item.NeedRestart)
{
$tool.NeedRestart = [bool]$item.NeedRestart;
}
if($item.BackwardCompatible)
{
$tool.BackwardCompatible = [bool]$item.BackwardCompatible;
}
$tool.Arguments = $item.arguments;

Expand Down Expand Up @@ -294,7 +317,6 @@ else
Write-Host ".NET Framework 3.5 feature is enabled" -ForegroundColor Green
}

Write-Host $downloadList.Length
foreach($item in $downloadList)
{
$isInstalled = $false;
Expand All @@ -310,7 +332,7 @@ foreach($item in $downloadList)
}
else
{
$isInstalled = CheckIfAppInstalled -AppName $item.AppName
$isInstalled = CheckIfAppInstalled -AppName $item.AppName -Version $item.version -Compatible $item.BackwardCompatible
if(-not $isInstalled)
{
$content = "Application: " +$item.AppName + " is not installed"
Expand Down Expand Up @@ -344,7 +366,20 @@ foreach($item in $downloadList)
}
}
else{
$content = $item.AppName + " is already installed"
if($item.AppName -match "Microsoft Agents for Visual Studio"){
if($item.BackwardCompatible){
$content = $item.AppName + " or later version or Microsoft Visual Studio is already installed"
}else{
$content = $item.AppName + " or Microsoft Visual Studio is already installed"
}
}else{
if($item.BackwardCompatible){
$content = $item.AppName + " or later version is already installed"
}else{
$content = $item.AppName + " is already installed"
}
}

Write-Host $content -ForegroundColor Green
}
}
Expand Down
14 changes: 7 additions & 7 deletions InstallPrerequisites/PrerequisitesConfig.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Dependency>
<tools>
<tool name="MMA_x64" FileName="MessageAnalyzer64.msi" AppName="Microsoft Message Analyzer" version="1.4" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer64.msi" arguments="/q"/>
<tool name="MMA_x86" FileName="MessageAnalyzer.msi" AppName="Microsoft Message Analyzer" version="1.4" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer.msi" arguments="/q"/>
<tool name="MMA_x64" FileName="MessageAnalyzer64.msi" AppName="Microsoft Message Analyzer" version="4.0.8108.0" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer64.msi" arguments="/q"/>
<tool name="MMA_x86" FileName="MessageAnalyzer.msi" AppName="Microsoft Message Analyzer" version="4.0.8108.0" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer.msi" arguments="/q"/>
<tool name="NetworkMonitor_x86" FileName="NM34_x86.exe" AppName="Microsoft Network Monitor 3.4" version="3.4" url="https://download.microsoft.com/download/7/1/0/7105C7FF-768E-4472-AFD5-F29108D1E383/NM34_x86.exe" arguments="/q"/>
<tool name="NetworkMonitor_x64" FileName="NM34_x64.exe" AppName="Microsoft Network Monitor 3.4" version="3.4" url="https://download.microsoft.com/download/7/1/0/7105C7FF-768E-4472-AFD5-F29108D1E383/NM34_x64.exe" arguments="/q"/>
<tool name="NetworkMontiorParsers_x64" FileName="NetworkMonitor_Parsers64" AppName="Microsoft Network Monitor: NetworkMonitor Parsers 3.4" version="3.4" url="http://download.connect.microsoft.com/pr/NetworkMonitor_Parsers_03_04_2978_x64.msi?t=b558570e-30f1-48f7-afc3-4168239af654&amp;e=1471922851&amp;h=4c97af49dcb46a0fc2d6a786a01d6495" arguments="/q"/>
<tool name="NetworkMontiorParsers_x86" FileName="NetworkMonitor_Parsers86" AppName="Microsoft Network Monitor: NetworkMonitor Parsers 3.4" version="3.4" url="http://download.connect.microsoft.com/pr/NetworkMonitor_Parsers_03_04_2978_x86.msi?t=1a84728d-cf65-4281-b415-5fc8a070a856&amp;e=1471922864&amp;h=1dfc9176e7b1f4cfb9dc3fccb282418d" arguments="/q"/>
<tool name="VCRedist_x64" FileName="vcredistx64.exe" AppName="Redistributable (x64)" version="9.0.30729.17" url="https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe" arguments="/q"/>
<tool name="VCRedist_x86" FileName="vcredist.exe" AppName="Redistributable (x86)" version="9.0.30729.17" url="https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe" arguments="/q"/>
<tool name="SE" FileName="SpecExplorer.msi" AppName="Spec Explorer 2010" version="3.5.3146.0" url="https://visualstudiogallery.msdn.microsoft.com/271d0904-f178-4ce9-956b-d9bfa4902745/file/36449/3/SpecExplorer.msi" arguments="/q"/>
<tool name="PTF_ForModel" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5500.0" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0.5500.0/ProtocolTestFrameworkInstallerForModel.msi" arguments="/q"/>
<tool name="PTF" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5500.0" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0.5500.0/ProtocolTestFrameworkInstaller.msi" arguments="/q"/>
<tool name="TestAgent2012" FileName="TestAgent2015.iso" InstallFileName="vstf_testagent.exe" NeedRestart="true" AppName="Microsoft Agents for Visual Studio 2012" version="2012" url="https://download.microsoft.com/download/0/0/1/0019CE26-F153-4A6C-95B3-FAE1BAE83066/VSU4/VS2012.4%20Agents%20ENU.iso" arguments="/q"/>
<tool name="PTF_ForModel" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5000.0" BackwardCompatible="false" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0/ProtocolTestFrameworkInstallerForModel.msi" arguments="/q"/>
<tool name="PTF" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5000.0" BackwardCompatible="false" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0/ProtocolTestFrameworkInstaller.msi" arguments="/q"/>
<tool name="TestAgent2012" FileName="TestAgent2012.iso" InstallFileName="vstf_testagent.exe" NeedRestart="true" AppName="Microsoft Agents for Visual Studio 2012" version="11.0.61030.0" url="https://download.microsoft.com/download/0/0/1/0019CE26-F153-4A6C-95B3-FAE1BAE83066/VSU4/VS2012.4%20Agents%20ENU.iso" arguments="/q"/>
<tool name="Wix310" FileName="Wix310.exe" AppName="WiX Toolset v3.10" version="3.10.3" url="http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&amp;DownloadId=1587179&amp;FileTime=131118854865270000&amp;Build=21031" arguments="/q"/>
<tool name="NET40" FileName="NET40.exe" AppName=".NET Framework 4.0" version="4.0" url="https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" arguments="/q"/>
<tool name="NET45" FileName="NET45.exe" AppName=".NET Framework 4.5" version="4.5" url="https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe" arguments="/q"/>
<tool name="OpenXMLSDK" FileName="OpenXMLSDK.msi" AppName="Open XML SDK 2.5" version="2.5" url="https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" arguments="/q"/>
<tool name="NET45" FileName="NET45.exe" AppName=".NET Framework 4.5" version="4.5.50710" url="https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe" arguments="/q"/>
<tool name="OpenXMLSDK" FileName="OpenXMLSDK.msi" AppName="Open XML SDK 2.5" version="2.5.5631" url="https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" arguments="/q"/>
</tools>
<FileServer>
<tool>NET40</tool>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public ClientStaticVirtualChannelManager(RdpbcgrClientContext context)
compressType = CompressionType.PACKET_COMPR_TYPE_NONE;
}
else if (context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP6 ||
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP62)
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP61)
{
compressType = CompressionType.PACKET_COMPR_TYPE_64K;
}
Expand Down
24 changes: 12 additions & 12 deletions ProtoSDK/MS-RDPBCGR/RdpbcgrDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -815,32 +815,32 @@ private TS_SECURITY_HEADER ParseTsSecurityHeaderFips(byte[] data, ref int curren

#region Sub Field Parsers: X224 Confirm PDU
/// <summary>
/// Parse X224Crq
/// Parse X224Ccf
/// (parser index is updated according to parsed length)
/// </summary>
/// <param name="data">data to be parsed</param>
/// <param name="currentIndex">current parser index</param>
/// <returns>X224Crq</returns>
private X224Crq ParseX224Crq(byte[] data, ref int currentIndex)
/// <returns>X224Ccf</returns>
private X224Ccf ParseX224Ccf(byte[] data, ref int currentIndex)
{
X224Crq crq = new X224Crq();
X224Ccf ccf = new X224Ccf();

// X224Crq: LengthIndicator
crq.lengthIndicator = ParseByte(data, ref currentIndex);
ccf.lengthIndicator = ParseByte(data, ref currentIndex);

// X224Crq: TypeCredit
crq.typeCredit = ParseByte(data, ref currentIndex);
ccf.typeCredit = ParseByte(data, ref currentIndex);

// X224Crq: DestRef
crq.destRef = ParseUInt16(data, ref currentIndex, true);
ccf.destRef = ParseUInt16(data, ref currentIndex, true);

// X224Crq: SrcRef
crq.srcRef = ParseUInt16(data, ref currentIndex, true);
ccf.srcRef = ParseUInt16(data, ref currentIndex, true);

// X224Crq: ClassOptions
crq.classOptions = ParseByte(data, ref currentIndex);
ccf.classOptions = ParseByte(data, ref currentIndex);

return crq;
return ccf;
}


Expand Down Expand Up @@ -4557,8 +4557,8 @@ public StackPacket DecodeX224ConnectionConfirmPDU(byte[] data)
// TpktHeader
TpktHeader tpktHeader = ParseTpktHeader(data, ref currentIndex);

// X224Crq
X224Crq x224Ccf = ParseX224Crq(data, ref currentIndex);
// X224Ccf
X224Ccf x224Ccf = ParseX224Ccf(data, ref currentIndex);

// RDP_NEG_RSP/RDP_NEG_FAILURE (optional field)
if (currentIndex < data.Length)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public ServerStaticVirtualChannelManager(RdpbcgrServerSessionContext context)
compressType = CompressionType.PACKET_COMPR_TYPE_NONE;
}
else if (context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP6 ||
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP62)
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP61)
{
compressType = CompressionType.PACKET_COMPR_TYPE_64K;
}
Expand Down
8 changes: 4 additions & 4 deletions ProtoSDK/MS-RDPBCGR/Types.cs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ public partial class Server_X_224_Connection_Confirm_Pdu : RdpbcgrServerPdu
/// An X.224 Class 0 Connection Confirm TPDU, as specified
/// in [X224] section 13.4.
/// </summary>
public X224Crq x224Ccf;
public X224Ccf x224Ccf;

/// <summary>
/// Optional RDP Negotiation Response structure or an optional
Expand Down Expand Up @@ -724,7 +724,7 @@ public partial class Server_X_224_Negotiate_Failure_Pdu : RdpbcgrServerPdu
/// An X.224 Class 0 Connection Confirm TPDU, as specified
/// in [X224] section 13.4.
/// </summary>
public X224Crq x224Ccf;
public X224Ccf x224Ccf;

/// <summary>
/// Optional RDP Negotiation Response structure or an optional
Expand Down Expand Up @@ -3265,10 +3265,10 @@ public enum CompressionType : byte
PACKET_COMPR_TYPE_RDP6 = 2,

/// <summary>
/// RDP 6.2 bulk compression (see [MS-RDPEGDI] section
/// RDP 6.1 bulk compression (see [MS-RDPEGDI] section
/// ).
/// </summary>
PACKET_COMPR_TYPE_RDP62 = 3,
PACKET_COMPR_TYPE_RDP61 = 3,

/// <summary>
/// No compression is supported.
Expand Down
49 changes: 40 additions & 9 deletions ProtocolTestManager/Kernel/Detector/Detector.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.Protocols.TestManager.Detector;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Microsoft.Protocols.TestManager.Detector;
using System.Threading;

namespace Microsoft.Protocols.TestManager.Kernel
{
Expand Down Expand Up @@ -87,19 +86,51 @@ private DetectionOutcome RunDetection()

private delegate DetectionOutcome DetectionDelegate();

private Thread detectThread = null;
/// <summary>
/// Begins the auto-detection.
/// </summary>
/// <param name="DetectionEvent">Callback function when the detection finished.</param>
public void BeginDetection(DetectionCallback DetectionEvent)
{
DetectionDelegate detectdelegate = new DetectionDelegate(RunDetection);
IAsyncResult result = detectdelegate.BeginInvoke(
(r) =>
detectThread = new Thread(new ThreadStart(()=>
{
var outcome = RunDetection();
if (DetectionEvent != null)
{
DetectionEvent(outcome);
}
}));
detectThread.Start();
}

/// <summary>
/// Stop the auto-detection
/// </summary>
public void StopDetection(Action callback)
{
if (detectThread != null)
{
try
{
var outcome = detectdelegate.EndInvoke(r);
if (DetectionEvent != null) DetectionEvent(outcome);
}, null);
detectThread.Interrupt();
detectThread.Abort();
}
catch { }
}

if (detectThread != null)
{
while (detectThread.ThreadState != ThreadState.Aborted)
{
Thread.Sleep(100);
}

if (callback != null)
{
callback();
}
}
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion ProtocolTestManager/Kernel/TestCaseFilter/Filter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.Protocols.TestManager.Kernel
/// <summary>
/// This class defines the filter of test case.
/// </summary>
class Filter
public class Filter
{
List<string> positiveCategories;
List<string> negativeCategories;
Expand Down
27 changes: 27 additions & 0 deletions ProtocolTestManager/Kernel/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,24 @@ public void StartDetection(DetectionCallback callback)
});
}

/// <summary>
/// Stop the auto-detection
/// </summary>
public void StopDetection(Action callback)
{
detector.DetectLogCallback = null;
detectSteps[stepIndex].DetectingStatus = TestManager.Detector.DetectingStatus.Canceling;
detector.StopDetection(callback);
if (stepIndex < detectSteps.Count) detectSteps[stepIndex].DetectingStatus = TestManager.Detector.DetectingStatus.Pending;
if (logWriter != null)
{
logWriter.Close();
logWriter.Dispose();
logWriter = null;
}
stepIndex = 0;
}

/// <summary>
/// Get a object to show on the UI as the detection summary.
/// </summary>
Expand Down Expand Up @@ -395,6 +413,15 @@ public List<TestCase> GetSelectedCaseList()
return selectedCases;
}

/// <summary>
/// Gets current TestSuite object.
/// </summary>
/// <returns>A TestSuite object</returns>
public TestSuite GetTestSuite()
{
return testSuite;
}

/// <summary>
/// The number of the selected test cases.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>MS-ADOD OD Test Suite</title>
<title>MS-ADFSPIP Test Suite</title>
<style>
div.Title
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ public class PtfConfig
[PtfConfig("ADFS.EncryptCert")]
public string AdfsEncryptCert { get; set; }

// FIXME: should determine ADFS is 2016
// change this once Test Suite is updated
[PtfConfig("SUT.IsWin2016")]
[PtfConfig("ADFS.IsWin2016")]
public string AdfsIsWin2016 { get; set; }

[PtfConfig("ADFS.StoreEntryKey_2012R2")]
Expand Down
Loading

0 comments on commit 349fa1f

Please sign in to comment.