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_CLI_TELEMETRY_OPTOUT: 1
|
||||
- AUTOBAHN_SUITES_LOG: 1
|
||||
- ASPNETCORE_WSTEST_PATH: "$TRAVIS_BUILD_DIR/.virtualenv/bin/wstest"
|
||||
mono: none
|
||||
python:
|
||||
- "2.7"
|
||||
- pypy
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
|
@ -23,9 +24,7 @@ branches:
|
|||
- release
|
||||
- dev
|
||||
- /^(.*\/)?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:
|
||||
- pip install autobahntestsuite "six>=1.9.0"
|
||||
- ./build/setup-wstest.sh
|
||||
script:
|
||||
- ./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);
|
||||
|
||||
// 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.");
|
||||
var exitCode = await Wstest.Default.ExecAsync("-m fuzzingclient -s " + specFile, cancellationToken, _loggerFactory.CreateLogger("wstest"));
|
||||
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 readonly string _path;
|
||||
public string Location { get; }
|
||||
|
||||
protected Executable(string path)
|
||||
{
|
||||
_path = path;
|
||||
Location = path;
|
||||
}
|
||||
|
||||
public static string Locate(string name)
|
||||
|
|
@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
|||
{
|
||||
StartInfo = new ProcessStartInfo()
|
||||
{
|
||||
FileName = _path,
|
||||
FileName = Location,
|
||||
Arguments = args,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardError = true,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,11 @@ namespace Microsoft.AspNetCore.WebSockets.ConformanceTest.Autobahn
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
private static string ClientAddress = "ws://localhost:54321/";
|
||||
|
||||
[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")]
|
||||
public async Task Connect_Success()
|
||||
{
|
||||
|
|
@ -35,8 +33,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task NegotiateSubProtocol_Success()
|
||||
{
|
||||
|
|
@ -53,14 +49,19 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
client.Options.AddSubProtocol("bravo");
|
||||
client.Options.AddSubProtocol("charlie");
|
||||
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]
|
||||
[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")]
|
||||
public async Task SendEmptyData_Success()
|
||||
{
|
||||
|
|
@ -86,8 +87,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task SendShortData_Success()
|
||||
{
|
||||
|
|
@ -114,8 +113,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task SendMediumData_Success()
|
||||
{
|
||||
|
|
@ -142,8 +139,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task SendLongData_Success()
|
||||
{
|
||||
|
|
@ -182,8 +177,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task SendFragmentedData_Success()
|
||||
{
|
||||
|
|
@ -228,8 +221,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task ReceiveShortData_Success()
|
||||
{
|
||||
|
|
@ -256,8 +247,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task ReceiveMediumData_Success()
|
||||
{
|
||||
|
|
@ -284,8 +273,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task ReceiveLongData()
|
||||
{
|
||||
|
|
@ -320,8 +307,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task ReceiveFragmentedData_Success()
|
||||
{
|
||||
|
|
@ -366,8 +351,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task SendClose_Success()
|
||||
{
|
||||
|
|
@ -397,8 +380,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task ReceiveClose_Success()
|
||||
{
|
||||
|
|
@ -428,8 +409,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task CloseFromOpen_Success()
|
||||
{
|
||||
|
|
@ -461,8 +440,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task CloseFromCloseSent_Success()
|
||||
{
|
||||
|
|
@ -496,8 +473,6 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
|
||||
[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")]
|
||||
public async Task CloseFromCloseReceived_Success()
|
||||
{
|
||||
|
|
@ -537,5 +512,5 @@ namespace Microsoft.AspNetCore.WebSockets.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue