Skip to content

Commit

Permalink
Merge pull request microsoft#263 from faxue-msft/master
Browse files Browse the repository at this point in the history
fix glass tests
  • Loading branch information
chuckries committed Apr 8, 2016
2 parents 4cb96d5 + 8496e3d commit 9c79d4e
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 17 deletions.
2 changes: 2 additions & 0 deletions src/MICore/Transports/StreamTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ private void TransportLoop()

line = line.TrimEnd();
Logger?.WriteLine("->" + line);
Logger?.Flush();

try
{
Expand Down Expand Up @@ -136,6 +137,7 @@ protected virtual void OnReadStreamAborted()
protected void Echo(string cmd)
{
Logger?.WriteLine("<-" + cmd);
Logger?.Flush();
_writer.WriteLine(cmd);
_writer.Flush();
}
Expand Down
3 changes: 2 additions & 1 deletion src/MIDebugEngine/AD7.Impl/AD7StackFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ int IDebugStackFrame2.GetCodeContext(out IDebugCodeContext2 memoryAddress)
// pointer associated with the stack frame. The debugger calls EnumProperties to obtain these values in the sample.
int IDebugStackFrame2.GetDebugProperty(out IDebugProperty2 property)
{
throw new NotImplementedException();
property = null;
return Constants.E_NOTIMPL;
}

// Gets the document context for this stack frame. The debugger will call this when the current stack frame is changed
Expand Down
2 changes: 1 addition & 1 deletion test/Android/Breakpoint/TestScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<Event name="IDebugThreadCreateEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
<Event name="IDebugBreakpointBoundEvent2" expected="True">
<BoundBreakpoint>24,0 to 24,0 in [Unknown]!break_test_1()</BoundBreakpoint>
<BoundBreakpoint RegEx="^24,0 to 24,0 in (\[Unknown\]|libbreakpoint.so)!break_test_1\(\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugModuleLoadEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
Expand Down
2 changes: 1 addition & 1 deletion test/Android/Eval/TestScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<Event name="IDebugThreadCreateEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>28,0 to 28,0 in [Unknown]!android_main(android_app*)</BoundBreakpoint>
<BoundBreakpoint RegEx="^28,0 to 28,0 in (\[Unknown\]|libeval.so)!android_main\(android_app\*\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugModuleLoadEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
Expand Down
4 changes: 2 additions & 2 deletions test/Android/Exceptions/TestScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<Event name="IDebugThreadCreateEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>43,0 to 43,0 in [Unknown]!android_main(android_app*)</BoundBreakpoint>
<BoundBreakpoint RegEx="^43,0 to 43,0 in (\[Unknown\]|libexceptions.so)!android_main\(android_app\*\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugModuleLoadEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
Expand Down Expand Up @@ -262,7 +262,7 @@
<Event name="IDebugThreadCreateEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>43,0 to 43,0 in [Unknown]!android_main(android_app*)</BoundBreakpoint>
<BoundBreakpoint RegEx="^43,0 to 43,0 in (\[Unknown\]|libexceptions.so)!android_main\(android_app\*\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugModuleLoadEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
Expand Down
14 changes: 7 additions & 7 deletions test/Android/Locals/TestScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,25 @@
<Event name="IDebugThreadCreateEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>31,0 to 31,0 in [Unknown]!SimpleClass::TestMe()</BoundBreakpoint>
<BoundBreakpoint RegEx="^31,0 to 31,0 in (\[Unknown\]|liblocals.so)!SimpleClass::TestMe\(\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>48,0 to 48,0 in [Unknown]!DerivedClass::DerivedClass(int, int)</BoundBreakpoint>
<BoundBreakpoint RegEx="^48,0 to 48,0 in (\[Unknown\]|liblocals.so)!DerivedClass::DerivedClass\(int, int\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>65,0 to 65,0 in [Unknown]!DerivedClass::TestMe()</BoundBreakpoint>
<BoundBreakpoint RegEx="^65,0 to 65,0 in (\[Unknown\]|liblocals.so)!DerivedClass::TestMe\(\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>116,0 to 116,0 in [Unknown]!android_main(android_app*)</BoundBreakpoint>
<BoundBreakpoint RegEx="^116,0 to 116,0 in (\[Unknown\]|liblocals.so)!android_main\(android_app\*\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>73,0 to 73,0 in [Unknown]!x_2()</BoundBreakpoint>
<BoundBreakpoint RegEx="^73,0 to 73,0 in (\[Unknown\]|liblocals.so)!x_2\(\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>80,0 to 80,0 in [Unknown]!x_1()</BoundBreakpoint>
<BoundBreakpoint RegEx="^80,0 to 80,0 in (\[Unknown\]|liblocals.so)!x_1\(\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>84,0 to 84,0 in [Unknown]!x_1()</BoundBreakpoint>
<BoundBreakpoint RegEx="^84,0 to 84,0 in (\[Unknown\]|liblocals.so)!x_1\(\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugModuleLoadEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
Expand Down
2 changes: 1 addition & 1 deletion test/Android/Sanity/TestScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<Event name="IDebugThreadCreateEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>221,0 to 221,0 in [Unknown]!android_main(android_app*)</BoundBreakpoint>
<BoundBreakpoint RegEx="^221,0 to 221,0 in (\[Unknown\]|libsanity.so)!android_main\(android_app\*\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugModuleLoadEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
Expand Down
2 changes: 1 addition & 1 deletion test/Android/Stepping/TestScript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<Event name="IDebugThreadCreateEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
<Event name="IDebugBreakpointBoundEvent2" expected="False">
<BoundBreakpoint>39,0 to 39,0 in [Unknown]!android_main(android_app*)</BoundBreakpoint>
<BoundBreakpoint RegEx="^39,0 to 39,0 in (\[Unknown\]|libstepping.so)!android_main\(android_app\*\)$"></BoundBreakpoint>
</Event>
<Event name="IDebugModuleLoadEvent2" expected="False" />
<Event name="IDebugOutputStringEvent2" expected="False" />
Expand Down
18 changes: 15 additions & 3 deletions test/Android/androidtest.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ set _LoopCount=
set _Verbose=
set _TestsToRun=

if "%~1"=="" goto Help
if "%~1"=="-?" goto Help
if "%~1"=="/?" goto Help

Expand Down Expand Up @@ -102,8 +101,8 @@ goto ArgLoopEnd
if NOT exist "%_SdkRoot%" echo ERROR: Android SDK does not exist at "%_SdkRoot%".& exit /b -1
if NOT exist "%_NdkRoot%" echo ERROR: Android NDK does not exist at "%_NdkRoot%".& exit /b -1

if "%_DeviceId%"=="" call :FindDeviceId
if "%_DeviceId%"=="" echo ERROR: DeviceId must be specified. Possible devices are:& "%_AdbExe%" devices &goto Help
if "%_Platform%"=="" echo ERROR: Platform must be specified.& goto Help

set _GlassFlags=-f TestScript.xml -e ErrorLog.xml -s SessionLog.xml -err -nodefaultsetup -nodvt
if not "%_Verbose%"=="1" set _GlassFlags=%_GlassFlags% -q
Expand All @@ -123,10 +122,20 @@ if "%_Verbose%"=="1" (
if "%_TestsToRun%"=="" goto RunAll
goto RunArgs

:FindDeviceId
if "%_Platform%"=="" set _Platform=x86
pushd %_SdkRoot%
for /f "tokens=1,6" %%i in ('platform-tools\adb devices -l ^| find /i "VS Emulator"') do (
echo Run on device: %%i %%j
set _DeviceId=%%i
popd
exit /b 0
)

:RunAll
set FAILED_TESTS=

pushd %~dp0\
pushd %~dp0
for /d %%t in (*) do if exist "%%t\TestScript.xml" call :RunSingleTest "%%t"
goto ReportResults

Expand Down Expand Up @@ -196,6 +205,9 @@ goto RunArgs

set LastTestSucceeded=true

:: remove installed package
call "%_SdkRoot%\platform-tools\adb.exe" -s %_DeviceId% shell pm uninstall -k com.%~1 > adb.log

:RunSingleTestDone
popd
exit /b 0
Expand Down

0 comments on commit 9c79d4e

Please sign in to comment.