Unbreak Travis and unskip some tests (#219)
This commit is contained in:
parent
de3355454c
commit
d3687bbc3f
|
|
@ -6,9 +6,10 @@ env:
|
||||||
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||||
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
- DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||||
- AUTOBAHN_SUITES_LOG: 1
|
- AUTOBAHN_SUITES_LOG: 1
|
||||||
|
- ASPNETCORE_WSTEST_PATH: "$TRAVIS_BUILD_DIR/.virtualenv/bin/wstest"
|
||||||
mono: none
|
mono: none
|
||||||
python:
|
python:
|
||||||
- "2.7"
|
- pypy
|
||||||
os:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
|
@ -23,9 +24,7 @@ branches:
|
||||||
- release
|
- release
|
||||||
- dev
|
- dev
|
||||||
- /^(.*\/)?ci-.*$/
|
- /^(.*\/)?ci-.*$/
|
||||||
before_install:
|
|
||||||
- if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install openssl python; ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
|
|
||||||
install:
|
install:
|
||||||
- pip install autobahntestsuite "six>=1.9.0"
|
- ./build/setup-wstest.sh
|
||||||
script:
|
script:
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||||
|
# Install python
|
||||||
|
brew update > /dev/null
|
||||||
|
brew install python
|
||||||
|
fi
|
||||||
|
|
||||||
|
type -p python
|
||||||
|
python --version
|
||||||
|
|
||||||
|
# Install local virtualenv
|
||||||
|
mkdir .python
|
||||||
|
cd .python
|
||||||
|
curl -O https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz
|
||||||
|
tar xf virtualenv-15.1.0.tar.gz
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Make a virtualenv
|
||||||
|
python ./.python/virtualenv-15.1.0/virtualenv.py .virtualenv
|
||||||
|
|
||||||
|
.virtualenv/bin/python --version
|
||||||
|
.virtualenv/bin/pip --version
|
||||||
|
|
||||||
|
# Install autobahn into the virtualenv
|
||||||
|
.virtualenv/bin/pip install autobahntestsuite
|
||||||
|
|
||||||
|
# We're done. The travis config has already established the path to WSTest should be within the virtualenv.
|
||||||
|
ls -l .virtualenv/bin
|
||||||
|
.virtualenv/bin/wstest --version
|
||||||
|
|
@ -43,6 +43,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
||||||
Spec.WriteJson(specFile);
|
Spec.WriteJson(specFile);
|
||||||
|
|
||||||
// Run the test (write something to the console so people know this will take a while...)
|
// Run the test (write something to the console so people know this will take a while...)
|
||||||
|
_logger.LogInformation("Using 'wstest' from: {WsTestPath}", Wstest.Default.Location);
|
||||||
_logger.LogInformation("Now launching Autobahn Test Suite. This will take a while.");
|
_logger.LogInformation("Now launching Autobahn Test Suite. This will take a while.");
|
||||||
var exitCode = await Wstest.Default.ExecAsync("-m fuzzingclient -s " + specFile, cancellationToken, _loggerFactory.CreateLogger("wstest"));
|
var exitCode = await Wstest.Default.ExecAsync("-m fuzzingclient -s " + specFile, cancellationToken, _loggerFactory.CreateLogger("wstest"));
|
||||||
if (exitCode != 0)
|
if (exitCode != 0)
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
||||||
{
|
{
|
||||||
private static readonly string _exeSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
|
private static readonly string _exeSuffix = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : string.Empty;
|
||||||
|
|
||||||
private readonly string _path;
|
public string Location { get; }
|
||||||
|
|
||||||
protected Executable(string path)
|
protected Executable(string path)
|
||||||
{
|
{
|
||||||
_path = path;
|
Location = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Locate(string name)
|
public static string Locate(string name)
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
||||||
{
|
{
|
||||||
StartInfo = new ProcessStartInfo()
|
StartInfo = new ProcessStartInfo()
|
||||||
{
|
{
|
||||||
FileName = _path,
|
FileName = Location,
|
||||||
Arguments = args,
|
Arguments = args,
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
RedirectStandardError = true,
|
RedirectStandardError = true,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,11 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
||||||
|
|
||||||
private static Wstest Create()
|
private static Wstest Create()
|
||||||
{
|
{
|
||||||
var location = Locate("wstest");
|
var location = Environment.GetEnvironmentVariable("ASPNETCORE_WSTEST_PATH");
|
||||||
|
if (string.IsNullOrEmpty(location))
|
||||||
|
{
|
||||||
|
location = Locate("wstest");
|
||||||
|
}
|
||||||
return location == null ? null : new Wstest(location);
|
return location == null ? null : new Wstest(location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
private static string ClientAddress = "ws://localhost:54321/";
|
private static string ClientAddress = "ws://localhost:54321/";
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task Connect_Success()
|
public async Task Connect_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -35,8 +33,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task NegotiateSubProtocol_Success()
|
public async Task NegotiateSubProtocol_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -53,14 +49,19 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
client.Options.AddSubProtocol("bravo");
|
client.Options.AddSubProtocol("bravo");
|
||||||
client.Options.AddSubProtocol("charlie");
|
client.Options.AddSubProtocol("charlie");
|
||||||
await client.ConnectAsync(new Uri(ClientAddress), CancellationToken.None);
|
await client.ConnectAsync(new Uri(ClientAddress), CancellationToken.None);
|
||||||
Assert.Equal("Bravo", client.SubProtocol);
|
|
||||||
|
// The Windows version of ClientWebSocket uses the casing from the header (Bravo)
|
||||||
|
// However, the Managed version seems match the header against the list generated by
|
||||||
|
// the AddSubProtocol calls (case-insensitively) and then use the version from
|
||||||
|
// that list as the value for SubProtocol. This is fine, but means we need to ignore case here.
|
||||||
|
// We could update our AddSubProtocols above to the same case but I think it's better to
|
||||||
|
// ensure this behavior is codified by this test.
|
||||||
|
Assert.Equal("Bravo", client.SubProtocol, ignoreCase: true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task SendEmptyData_Success()
|
public async Task SendEmptyData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -86,8 +87,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task SendShortData_Success()
|
public async Task SendShortData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -114,8 +113,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task SendMediumData_Success()
|
public async Task SendMediumData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -142,8 +139,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task SendLongData_Success()
|
public async Task SendLongData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -182,8 +177,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task SendFragmentedData_Success()
|
public async Task SendFragmentedData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -228,8 +221,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task ReceiveShortData_Success()
|
public async Task ReceiveShortData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -256,8 +247,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task ReceiveMediumData_Success()
|
public async Task ReceiveMediumData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -284,8 +273,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task ReceiveLongData()
|
public async Task ReceiveLongData()
|
||||||
{
|
{
|
||||||
|
|
@ -320,8 +307,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task ReceiveFragmentedData_Success()
|
public async Task ReceiveFragmentedData_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -366,8 +351,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task SendClose_Success()
|
public async Task SendClose_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -397,8 +380,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task ReceiveClose_Success()
|
public async Task ReceiveClose_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -428,8 +409,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task CloseFromOpen_Success()
|
public async Task CloseFromOpen_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -461,8 +440,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task CloseFromCloseSent_Success()
|
public async Task CloseFromCloseSent_Success()
|
||||||
{
|
{
|
||||||
|
|
@ -496,8 +473,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
||||||
}
|
}
|
||||||
|
|
||||||
[ConditionalFact]
|
[ConditionalFact]
|
||||||
[OSSkipCondition(OperatingSystems.Linux, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "No WebSockets Client for this platform")]
|
|
||||||
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
[OSSkipCondition(OperatingSystems.Windows, WindowsVersions.Win7, SkipReason = "No WebSockets Client for this platform")]
|
||||||
public async Task CloseFromCloseReceived_Success()
|
public async Task CloseFromCloseReceived_Success()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue