Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyang-mono committed Dec 3, 2020
1 parent 0e8d83c commit ecdf4d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/tests/Common/CLRTest.Execute.Batch.targets
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ IF NOT "%__TestDotNetCmd%"=="" (
IF NOT "%XHARNESS_CLI_PATH%"=="" (
REM When running in CI, we only have the .NET runtime available
REM We need to call the XHarness CLI DLL directly via dotnet exec
set HARNESS_RUNNER=%__Command% exec "%XHARNESS_CLI_PATH%"
set HARNESS_RUNNER=exec "%XHARNESS_CLI_PATH%"
) ELSE (
set HARNESS_RUNNER=%__Command% xharness
set HARNESS_RUNNER=xharness
)
%HARNESS_RUNNER% android test --instrumentation="net.dot.MonoRunner" --package-name="net.dot.%__Category%" --app="%__TestBinaryBase%\%__Category%.apk" --output-directory="%25cd%25" --arg=entryPointLibName=$(MsBuildProjectName).dll --expected-exit-code=100 -v
%__Command% %HARNESS_RUNNER% android test --instrumentation="net.dot.MonoRunner" --package-name="net.dot.%__Category%" --app="%__TestBinaryBase%\%__Category%.apk" --output-directory="%25cd%25" --arg=entryPointLibName=$(MsBuildProjectName).dll --expected-exit-code=100 -v
set CLRTestExitCode=!ERRORLEVEL!
set CLRTestExpectedExitCode=0
]]></BatchCLRTestLaunchCmds>
Expand Down Expand Up @@ -410,7 +410,7 @@ $(BatchCLRTestArgPrep)
<!-- NOTE! semicolons must be escaped with %3B boooo -->
<_CLRTestExecutionScriptText>
<![CDATA[
@ECHO ON
@ECHO OFF
setlocal ENABLEDELAYEDEXPANSION
set "lockFolder=%~dp0\lock"
pushd %~dp0
Expand Down
13 changes: 5 additions & 8 deletions src/tests/run.proj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<XunitTestBinBase Condition="'$(XunitTestBinBase)'==''" >$(BaseOutputPathWithConfig)</XunitTestBinBase>
<XunitWrapperGeneratedCSDirBase>$(XunitTestBinBase)\TestWrappers\</XunitWrapperGeneratedCSDirBase>
<MSBuildEnableAllPropertyFunctions>1</MSBuildEnableAllPropertyFunctions>
<TestScriptExtension Condition="'$(TestWrapperTargetsWindows)' != 'true' ">sh</TestScriptExtension>
<TestScriptExtension Condition="'$(TestWrapperTargetsWindows)' == 'true' ">cmd</TestScriptExtension>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -222,13 +224,10 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").

<PropertyGroup>
<TestExecutableReplacement Condition="'$(TestWrapperTargetsWindows)' != 'true' ">testExecutable = testExecutable.Replace("\\", "/")%3B</TestExecutableReplacement>
<TestScriptExtension Condition="'$(TestWrapperTargetsWindows)' != 'true' ">sh</TestScriptExtension>
<TestScriptExtension Condition="'$(TestWrapperTargetsWindows)' == 'true' ">cmd</TestScriptExtension>
</PropertyGroup>

<ItemGroup>
<AllCMDsPresent Include="$(_CMDDIR)\**\*.cmd" Condition="'$(TestWrapperTargetsWindows)' == 'true'" />
<AllCMDsPresent Include="$(_CMDDIR)\**\*.sh" Condition="'$(TestWrapperTargetsWindows)' != 'true'" />
<AllCMDsPresent Include="$(_CMDDIR)\**\*.$(TestScriptExtension)" />
<AllCMDsPresent Remove="$(_CMDDIR)\**\run-v8.sh" Condition="'$(TargetArchitecture)' == 'wasm'" />
<TestGroupingDistinctWithCase Include="@(TestGrouping->Metadata('FullPath')->DistinctWithCase())" />
<TestGroupingNotRelevant Include="@(TestGroupingDistinctWithCase)" Exclude="@(AllCMDsPresent)" />
Expand Down Expand Up @@ -436,8 +435,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").
<MakeDir Directories="$(BuildDir)"/>

<ItemGroup>
<AllCMDsPresent Include="$(_CMDDIR)\**\*.sh" Condition=" '$(TestWrapperTargetsWindows)' != 'true' "/>
<AllCMDsPresent Include="$(_CMDDIR)\**\*.cmd" Condition=" '$(TestWrapperTargetsWindows)' == 'true' "/>
<AllCMDsPresent Include="$(_CMDDIR)\**\*.$(TestScriptExtension)"/>
<TestAssemblies Include="@(AllCMDsPresent->'%(RelativeDir)%(Filename).dll')" />
<TestAssemblyDirs Include="@(AllCMDsPresent->'%(RelativeDir)')" />
<AssembliesInTestDirs Include="%(AllCMDsPresent.RelativeDir)*.dll" Exclude="@(TestAssemblies)"/>
Expand Down Expand Up @@ -493,8 +491,7 @@ namespace $([System.String]::Copy($(Category)).Replace(".","_").Replace("\","").

<Target Name="GetListOfTestCmds">
<ItemGroup>
<AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.cmd" Condition="'$(TestWrapperTargetsWindows)' == 'true'" />
<AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.sh" Condition="'$(TestWrapperTargetsWindows)' == 'false'" />
<AllRunnableTestPaths Include="$(XunitTestBinBase)\**\*.$(TestScriptExtension)"/>
<AllRunnableTestPaths Remove="$(XunitTestBinBase)\**\run-v8.sh" Condition="'$(TargetArchitecture)' == 'wasm'" />
</ItemGroup>
</Target>
Expand Down

0 comments on commit ecdf4d5

Please sign in to comment.