Skip to content

Commit

Permalink
Revert "[Merge-on-Red] - Implement Test Process Watcher (#78742)"
Browse files Browse the repository at this point in the history
This reverts commit 728fd85.
  • Loading branch information
hoyosjs authored Mar 14, 2023
1 parent a78f9bd commit a0b6048
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 186 deletions.
6 changes: 0 additions & 6 deletions src/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ else()
endif()
endif()

#----------------------------------------------------
# Build the test watchdog alongside the CLR
#----------------------------------------------------
add_subdirectory("${CLR_SRC_NATIVE_DIR}/watchdog" test-watchdog)

# Add this subdir. We install the headers for the jit.
add_subdirectory(pal/prebuilt/inc)

Expand Down Expand Up @@ -280,4 +275,3 @@ endif(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAK
if(CLR_CROSS_COMPONENTS_BUILD)
include(crosscomponents.cmake)
endif(CLR_CROSS_COMPONENTS_BUILD)

4 changes: 0 additions & 4 deletions src/native/watchdog/CMakeLists.txt

This file was deleted.

136 changes: 0 additions & 136 deletions src/native/watchdog/watchdog.cpp

This file was deleted.

23 changes: 4 additions & 19 deletions src/tests/Common/CLRTest.Execute.Bash.targets
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,12 @@ fi
<Command><![CDATA[ export __DotEnv="${i#*=}"
if [ ! -f "$__DotEnv" ]
then
echo "The dotenv file FullPath %5C%22${__DotEnv}%5C%22 does not exist"
echo "The Debugger FullPath %5C%22${__DotEnv}%5C%22 does not exist"
usage
fi
export __DotEnvArg=-e ${__DotEnv}]]></Command>
<Description>A dotenv file to pass to corerun to set environment variables for the test run.</Description>
</BashCLRTestExecutionScriptArgument>

<BashCLRTestExecutionScriptArgument Include="usewatcher">
<HasParam>false</HasParam>
<Command><![CDATA[ _RunWithWatcher=1]]></Command>
<Description>Run the tests using the test watcher.</Description>
</BashCLRTestExecutionScriptArgument>
</ItemGroup>

<PropertyGroup>
Expand Down Expand Up @@ -256,11 +250,10 @@ then
exit 1
fi
# Copy CORECLR native binaries and the test watcher to $LinkBin,
# Copy CORECLR native binaries to $LinkBin,
# so that we can run the test based on that directory
cp $CORE_ROOT/*.so $LinkBin/
cp $CORE_ROOT/corerun $LinkBin/
cp $CORE_ROOT/watchdog $LinkBin/
# Copy some files that may be arguments
for f in *.txt;
Expand Down Expand Up @@ -290,7 +283,6 @@ fi
</PropertyGroup>
<PropertyGroup>
<CLRTestRunFile Condition="'$(CLRTestIsHosted)'=='true'">"$CORE_ROOT/corerun" $(CoreRunArgs) ${__DotEnvArg}</CLRTestRunFile>
<WatcherRunFile>"$CORE_ROOT/watchdog" 300</WatcherRunFile>

<!-- Note that this overwrites CLRTestBashPreCommands rather than adding to it. -->
<CLRTestBashPreCommands Condition="'$(CLRTestKind)' == 'BuildAndRun' and '$(TargetArchitecture)' == 'wasm'"><![CDATA[
Expand Down Expand Up @@ -326,9 +318,6 @@ fi
if [ ! -z "$CLRCustomTestLauncher" ];
then
LAUNCHER="$CLRCustomTestLauncher $PWD/"
elif [ "$_RunWithWatcher" == 1 ];
then
LAUNCHER="$(WatcherRunFile) $(CLRTestRunFile)"
else
LAUNCHER="$_DebuggerFullPath $_DebuggerArgsSeparator $(CLRTestRunFile)"
fi
Expand Down Expand Up @@ -357,11 +346,8 @@ $(BashLinkerTestLaunchCmds)
if [ ! -z "$CLRCustomTestLauncher" ];
then
LAUNCHER="$CLRCustomTestLauncher $PWD/"
elif [ "$_RunWithWatcher" == 1 ];
then
LAUNCHER="$(WatcherRunFile) $(CLRTestRunFile)"
else
LAUNCHER="$_DebuggerFullPath $_DebuggerArgsSeparator $(CLRTestRunFile)"
LAUNCHER="$_DebuggerFullPath $(CLRTestRunFile)"
fi
$(BashIlrtTestLaunchCmds)
Expand Down Expand Up @@ -498,7 +484,7 @@ usage()
for i in "$@"
do
case $i in
-?|-h|--help|/?|/h|/help)
-?|-h|--help)
usage
%3B%3B
@(BashCLRTestExecutionScriptArgument -> ' -%(Identity)%(ParamText)|/%(Identity)%(ParamText))
Expand Down Expand Up @@ -548,7 +534,6 @@ ReleaseLock()
}
cd "$%28dirname "${BASH_SOURCE[0]}")"
LockFile="lock"
_RunWithWatcher=0
# The __TestEnv variable may be used to specify a script to source before the test.
Expand Down
18 changes: 2 additions & 16 deletions src/tests/Common/CLRTest.Execute.Batch.targets
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,6 @@ Exit /b 0
]]></Command>
<Description>Set CORE_ROOT to the specified value before running the test.</Description>
</BatchCLRTestExecutionScriptArgument>

<BatchCLRTestExecutionScriptArgument Include="usewatcher">
<HasParam>false</HasParam>
<Command><![CDATA[
set /A _RunWithWatcher=1
]]></Command>
<Description>Run the tests using the test watcher.</Description>
</BatchCLRTestExecutionScriptArgument>
</ItemGroup>

<PropertyGroup>
Expand Down Expand Up @@ -268,18 +260,17 @@ IF defined DoLink (
Exit /b 1
)
REM Copy CORECLR native binaries and the test watcher to %LinkBin%, so that we can run the test based on that directory
REM Copy CORECLR native binaries to %LinkBin%, so that we can run the test based on that directory
copy %CORE_ROOT%\clrjit.dll %LinkBin% > nul 2> nul
copy %CORE_ROOT%\coreclr.dll %LinkBin% > nul 2> nul
copy %CORE_ROOT%\mscorrc.dll %LinkBin% > nul 2> nul
copy %CORE_ROOT%\CoreRun.exe %LinkBin% > nul 2> nul
copy %CORE_ROOT%\watchdog.exe %LinkBin% > nul 2> nul
REM Copy some files that may be arguments
copy *.txt %LinkBin% > nul 2> nul
set ExePath=%LinkBin%\$(InputAssemblyName)
set CORE_ROOT=%scriptPath%\%LinkBin%
set CORE_ROOT=%scriptPath%LinkBin%
)
]]>
</BatchLinkerTestLaunchCmds>
Expand All @@ -298,8 +289,6 @@ if defined DoLink (
</PropertyGroup>
<PropertyGroup>
<CLRTestRunFile Condition="'$(CLRTestIsHosted)'=='true'">"%CORE_ROOT%\corerun.exe" $(CoreRunArgs) %__DotEnvArg%</CLRTestRunFile>
<WatcherRunFile>"%CORE_ROOT%\watchdog.exe" 300</WatcherRunFile>

<BatchCopyCoreShimLocalCmds Condition="'$(CLRTestScriptLocalCoreShim)' == 'true'"><![CDATA[
REM Local CoreShim requested - see MSBuild property 'CLRTestScriptLocalCoreShim'
ECHO Copying '%CORE_ROOT%\CoreShim.dll'...
Expand All @@ -312,8 +301,6 @@ $(BatchCopyCoreShimLocalCmds)
IF NOT "%CLRCustomTestLauncher%"=="" (
set LAUNCHER=call %CLRCustomTestLauncher% %scriptPath%
) ELSE IF %_RunWithWatcher% EQU 1 (
set LAUNCHER=$(WatcherRunFile) $(CLRTestRunFile)
) ELSE (
set LAUNCHER=%_DebuggerFullPath% $(CLRTestRunFile)
)
Expand Down Expand Up @@ -438,7 +425,6 @@ setlocal ENABLEDELAYEDEXPANSION
set "lockFolder=%~dp0\lock"
pushd %~dp0
set "scriptPath=%~dp0"
set /A _RunWithWatcher=0
$(BatchCLRTestArgPrep)
$(BatchCLRTestExitCodePrep)
Expand Down
8 changes: 3 additions & 5 deletions src/tests/Common/helixpublishwitharcade.proj
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@
<HelixCommandLines Condition="'$(TestWrapperTargetsWindows)' != 'true'" Include="export TEST_HARNESS_STRIPE_TO_EXECUTE=.0.1" />
<HelixCommandLines Condition="'$(TestWrapperTargetsWindows)' != 'true'" Include="chmod +x $(_MergedWrapperRunScriptRelative)" />
<!-- Force assemblies to lazy-load for LLVM AOT test runs to enable using tests that fail at AOT time (and as a result can't be AOTd) -->
<HelixCommandLines Condition="'$(RuntimeVariant)' == 'llvmfullaot'" Include="$(_MergedWrapperRunScriptPrefix)$(_MergedWrapperRunScriptRelative) -usewatcher --aot-lazy-assembly-load" />
<HelixCommandLines Condition="'$(RuntimeVariant)' != 'llvmfullaot'" Include="$(_MergedWrapperRunScriptPrefix)$(_MergedWrapperRunScriptRelative) -usewatcher" />
<HelixCommandLines Condition="'$(RuntimeVariant)' == 'llvmfullaot'" Include="$(_MergedWrapperRunScriptPrefix)$(_MergedWrapperRunScriptRelative) --aot-lazy-assembly-load" />
<HelixCommandLines Condition="'$(RuntimeVariant)' != 'llvmfullaot'" Include="$(_MergedWrapperRunScriptPrefix)$(_MergedWrapperRunScriptRelative)" />
<HelixCommandLines Include="$(XUnitLogCheckerCommand)" />
</ItemGroup>

Expand Down Expand Up @@ -722,9 +722,7 @@

<ItemGroup Condition=" '$(UsesHelixSdk)' == 'true' ">
<HelixCorrelationPayload Include="$(CoreRootDirectory)" />

<!-- Browser-Wasm follows a very different workflow, which is currently out of scope of the Log Checker. -->
<HelixCorrelationPayload Include="$(XUnitLogCheckerDirectory)" Condition="'$(TargetsBrowser)' != 'true'" />
<HelixCorrelationPayload Include="$(XUnitLogCheckerDirectory)" />

<LegacyPayloads Include="$([System.IO.Directory]::GetDirectories($(LegacyPayloadsRootDirectory)))" Condition="Exists('$(LegacyPayloadsRootDirectory)')" />
<LegacyPayloads Update="@(LegacyPayloads)">
Expand Down

0 comments on commit a0b6048

Please sign in to comment.