Fixing SignalR Daily Tests (#6630)
This commit is contained in:
parent
922512a9fb
commit
921c6c16d6
|
|
@ -10,7 +10,7 @@ jobs:
|
|||
- template: jobs/default-build.yml
|
||||
parameters:
|
||||
buildDirectory: src/SignalR
|
||||
buildArgs: "/p:DailyTests=true /p:SauceUser='$(asplab-sauce-labs-username)' /p:SauceKey='$(asplab-sauce-labs-access-key)'"
|
||||
buildArgs: "/p:DailyTests=true /p:SauceUser='$(asplab-sauce-labs-username)' /p:SauceKey='$(asplab-sauce-labs-access-key)' -t"
|
||||
agentOs: Windows
|
||||
jobName: SignalRDailyTests
|
||||
jobDisplayName: "SignalR Daily Tests"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,12 @@
|
|||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<NpmTestArgs>run test:local -- --no-color --configuration $(Configuration)</NpmTestArgs>
|
||||
<BrowserTestHostName Condition="'$(CI)' == 'true'">sauce.local</BrowserTestHostName>
|
||||
<_TestSauceArgs>--verbose --no-color --configuration $(Configuration) --sauce-user "$(SauceUser)" --sauce-key "$(SauceKey)"</_TestSauceArgs>
|
||||
<_TestSauceArgs Condition="'$(BrowserTestHostName)' != ''">$(_TestSauceArgs) --use-hostname "$(BrowserTestHostName)"</_TestSauceArgs>
|
||||
<NpmTestArgs Condition="'$(DailyTests)' != 'true'">run test:local -- --no-color --configuration $(Configuration)</NpmTestArgs>
|
||||
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -14,4 +19,34 @@
|
|||
</ItemGroup>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
||||
|
||||
<Target Name="Test" Condition="'$(IsTestProject)' == 'true'">
|
||||
<Message Importance="High" Text="Running npm tests for $(MSBuildProjectName)" />
|
||||
<Exec Condition="'$(DailyTests)' != 'true'" Command="npm $(NpmTestArgs)" IgnoreStandardErrorWarningFormat="true" />
|
||||
<CallTarget Condition="'$(DailyTests)' == 'true'" Targets="RunBrowserTests" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RunBrowserTests">
|
||||
<Message Text="Running JavaScript client Browser tests" Importance="high" />
|
||||
<Exec Command="npm run test:inner -- --no-color --configuration $(Configuration)" WorkingDirectory="$(RepositoryRoot)src/SignalR/clients/ts/FunctionalTests" IgnoreStandardErrorWarningFormat="true" />
|
||||
<Message Text="Running JavaScript tests" Importance="high" />
|
||||
|
||||
<!-- Skip the "inner" test run when we're running DailyTests -->
|
||||
<Exec Command="npm run test:inner -- --no-color --configuration $(Configuration)"
|
||||
Condition="'$(DailyTests)' != 'true'"
|
||||
WorkingDirectory="$(RepositoryRoot)src/SignalR/clients/ts/FunctionalTests"
|
||||
IgnoreStandardErrorWarningFormat="true" />
|
||||
|
||||
<PropertyGroup>
|
||||
<BrowserTestHostName Condition="'$(CI)' == 'true'">sauce.local</BrowserTestHostName>
|
||||
<_TestSauceArgs>--verbose --no-color --configuration $(Configuration) --sauce-user "$(SauceUser)" --sauce-key "$(SauceKey)"</_TestSauceArgs>
|
||||
<_TestSauceArgs Condition="'$(BrowserTestHostName)' != ''">$(_TestSauceArgs) --use-hostname "$(BrowserTestHostName)"</_TestSauceArgs>
|
||||
</PropertyGroup>
|
||||
<Message Text="test:sauce Args = $(_TestSauceArgs)" Importance="high" />
|
||||
<Exec Command="npm run test:sauce -- $(_TestSauceArgs)"
|
||||
Condition="'$(DailyTests)' == 'true'"
|
||||
WorkingDirectory="$(RepositoryRoot)src/SignalR/clients/ts/FunctionalTests"
|
||||
IgnoreStandardErrorWarningFormat="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import * as _debug from "debug";
|
|||
|
||||
const debug = _debug("signalr-functional-tests:run");
|
||||
|
||||
const ARTIFACTS_DIR = path.resolve(__dirname, "..", "..", "..", "..", "artifacts");
|
||||
const ARTIFACTS_DIR = path.resolve(__dirname, "..", "..", "..", "..", "..", "..", "artifacts");
|
||||
const LOGS_DIR = path.resolve(ARTIFACTS_DIR, "logs");
|
||||
|
||||
const HOSTSFILE_PATH = process.platform === "win32" ? `${process.env.SystemRoot}\\System32\\drivers\\etc\\hosts` : null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue