Skip to content

Commit

Permalink
close #3150 - resolved issue with missing runtime assembly loaded dep…
Browse files Browse the repository at this point in the history
…endencies

trigger full rebuild when common.props is modified
skipped buggy .NET Core specs
  • Loading branch information
Aaronontheweb authored and Danthar committed Oct 18, 2017
1 parent 1d9eadb commit 6a460ba
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 42 deletions.
20 changes: 10 additions & 10 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ Target "RunTests" (fun _ ->
let projects =
match getBuildParamOrDefault "incremental" "" with
| "true" -> log "The following test projects would be run under Incremental Test config..."
getIncrementalUnitTests() |> Seq.map (fun x -> printfn "\t%s" x; x)
getIncrementalUnitTests Net |> Seq.map (fun x -> printfn "\t%s" x; x)
| "experimental" -> log "The following test projects would be run under Incremental Test config..."
getIncrementalUnitTests() |> Seq.iter log
getUnitTestProjects()
(getIncrementalUnitTests Net) |> Seq.iter log
getUnitTestProjects Net
| _ -> log "All test projects will be run..."
getUnitTestProjects()
getUnitTestProjects Net

let runSingleProject project =
let result = ExecProcess(fun info ->
Expand All @@ -140,12 +140,12 @@ Target "RunTestsNetCore" (fun _ ->
let projects =
match getBuildParamOrDefault "incremental" "" with
| "true" -> log "The following test projects would be run under Incremental Test config..."
getIncrementalUnitTests() |> Seq.map (fun x -> printfn "\t%s" x; x)
getIncrementalUnitTests NetCore |> Seq.map (fun x -> printfn "\t%s" x; x)
| "experimental" -> log "The following test projects would be run under Incremental Test config..."
getIncrementalUnitTests() |> Seq.iter log
getUnitTestProjects()
getIncrementalUnitTests NetCore |> Seq.iter log
getUnitTestProjects NetCore
| _ -> log "All test projects will be run..."
getUnitTestProjects()
getUnitTestProjects NetCore

let runSingleProject project =
let result = ExecProcess(fun info ->
Expand All @@ -171,9 +171,9 @@ Target "MultiNodeTests" (fun _ ->
let multiNodeTestAssemblies =
match getBuildParamOrDefault "incremental" "" with
| "true" -> log "The following test projects would be run under Incremental Test config..."
getIncrementalMNTRTests() |> Seq.map (fun x -> printfn "\t%s" x; x)
getIncrementalMNTRTests |> Seq.map (fun x -> printfn "\t%s" x; x)
| "experimental" -> log "The following MNTR specs would be run under Incremental Test config..."
getIncrementalMNTRTests() |> Seq.iter log
getIncrementalMNTRTests |> Seq.iter log
getAllMntrTestAssemblies()
| _ -> log "All test projects will be run"
getAllMntrTestAssemblies()
Expand Down
48 changes: 33 additions & 15 deletions buildIncremental.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ module IncrementalTests =
| Linux
| All

type Runtime =
| NetCore
| Net

let SkippedTest name runtime =
match (name, runtime) with
| (EndsWith "Sqlite.Tests.csproj", NetCore) -> false
| _ -> true


let (|IsRunnable|_|) name platform (csproj:string) =
let isSupported =
match platform with
Expand All @@ -30,19 +40,21 @@ module IncrementalTests =
| IsRunnable "Akka.API.Tests.csproj" Linux proj -> false
| _ -> true

let getUnitTestProjects() =
let getUnitTestProjects runtime =
let allTestProjects = !! "./**/core/**/*.Tests.csproj"
++ "./**/contrib/**/*.Tests.csproj"
-- "./**/serializers/**/*Wire*.csproj"
allTestProjects
|> Seq.filter IsRunnable
|> Seq.filter (fun p -> SkippedTest p runtime) // filter out specs that should not be run based on .NET Core / .NET differences

let isBuildScript (file:string) =
match file with
| EndsWith "fsx" -> true
| EndsWith "ps1" -> true
| EndsWith "cmd" -> true
| EndsWith "sh" -> true
| EndsWith "props" -> true // use common.props to trigger full build
| _ -> false

let getHeadHashFor repositoryDir branch =
Expand Down Expand Up @@ -131,16 +143,18 @@ module IncrementalTests =
// MultiNodeTestRunner incremental test selection
//--------------------------------------------------------------------------------

let getMntrProjects() =
let getMntrProjects runtime =
!! "./src/**/*Tests.MultiNode.csproj"
|> Seq.map (fun x -> x.ToString())
|> Seq.filter (fun p -> SkippedTest p runtime) // filter out specs that should not be run based on .NET Core / .NET differences

let getAllMntrTestAssemblies() = // if we're not running incremental tests
getMntrProjects()
getMntrProjects Net
|> Seq.map (fun x -> getAssemblyForProject x)
|> Seq.filter (fun p -> SkippedTest p Net) // filter out specs that should not be run based on .NET Core / .NET differences

let getAllMntrTestNetCoreAssemblies() = // if we're not running incremental tests
getMntrProjects()
getMntrProjects NetCore
|> Seq.map (fun x -> getNetCoreAssemblyForProject x)

//--------------------------------------------------------------------------------
Expand Down Expand Up @@ -215,18 +229,21 @@ module IncrementalTests =
//logfn "%s references %s but is not a test project..." proj.parentProject.projectName project
yield! findTestProjectsThatHaveDependencyOn proj.parentProject.projectName testMode }

let getIncrementalTestProjects2 testMode =
let getIncrementalTestProjects2 testMode runtime =
logfn "Searching for incremental tests to run in %s test mode..." (testMode.ToString())
let updatedFiles = getUpdatedFiles()
log "The following files have been updated since forking from dev branch..."
updatedFiles |> Seq.iter (fun x -> logfn "\t%s" x)
log "The following test projects will be run..."
if (updatedFiles |> Seq.exists (fun p -> isBuildScript p)) then
log "Full test suite"
match testMode with
| Unit -> getUnitTestProjects()
| MNTR -> getMntrProjects()
| Perf -> getPerfTestProjects()
let specs =
match testMode with
| Unit -> getUnitTestProjects runtime
| MNTR -> getMntrProjects runtime
| Perf -> getPerfTestProjects()
specs
|> Seq.filter (fun p -> SkippedTest p runtime) // filter out specs that should not be run based on .NET Core / .NET differences
else
updatedFiles
|> generateContainingProjFileCollection
Expand All @@ -236,18 +253,19 @@ module IncrementalTests =
|> Seq.map (fun p -> p.parentProject.projectPath)
|> Seq.distinct
|> Seq.filter IsRunnable
|> Seq.filter (fun p -> SkippedTest p runtime) // filter out specs that should not be run based on .NET Core / .NET differences

let getIncrementalUnitTests() =
getIncrementalTestProjects2 Unit
let getIncrementalUnitTests runtime =
getIncrementalTestProjects2 Unit runtime

let getIncrementalMNTRTests() =
getIncrementalTestProjects2 MNTR
let getIncrementalMNTRTests =
getIncrementalTestProjects2 MNTR Net
|> Seq.map (fun p -> getAssemblyForProject p)

let getIncrementalNetCoreMNTRTests() =
getIncrementalTestProjects2 MNTR
getIncrementalTestProjects2 MNTR NetCore
|> Seq.map (fun p -> getNetCoreAssemblyForProject p)

let getIncrementalPerfTests() =
getIncrementalTestProjects2 Perf
getIncrementalTestProjects2 Perf Net
|> Seq.map (fun p -> getAssemblyForProject p)
21 changes: 4 additions & 17 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,9 @@
<AkkaPackageTags>akka;actors;actor model;Akka;concurrency</AkkaPackageTags>
</PropertyGroup>
<PropertyGroup>
<PackageReleaseNotes>Maintenance Release for Akka.NET 1.3**
Updates and bugfixes**:
- Bugfix: Hyperion NuGet package restore creating duplicate assemblies for the same version inside Akka
- Various documentation fixes and updates
- Bugfix: issue where data sent via UDP when `ByteString` payload had buffers with length more than 1, `UdpSender` only wrote the first part of the buffers and dropped the rest.
- Bugfix: Akka.IO.Tcp failed to write some outgoing messages.
- Improved support for OSX &amp; Rider
- Bugfix: Akka.Persistence support for `SerializerWithStringManifest` required by Akka.Cluster.Sharding and Akka.Cluster.Tools
- Akka.Persistence.Sqlite and Akka.Persistence.SqlServer were unable to support `SerializerWithStringManifest`, so using Akka.Cluster.Sharding with Sql plugins would not work.
- Bugfix: Akka.Streams generic type parameters of the flow returned from current implementation of Bidiflow's JoinMat method were incorrect.
- Bugfix: `PersistenceMessageSerializer` was failing with the wrong exceptoin when a non-supported type was provided.
Akka.Persistence backwards compability warning**:
- Akka.Persistence.Sql introduces an additional field to the schema used by Sql-based plugins to allow for the use of `SerializerWithStringManifest` called `serializer_id`. It requires any previous Sql schema to be updated to have this field. Details are included in the Akka.Persistence.Sqlite plugin README.md file. Users of the Akka.Persistence.Sqlite plugin must alter their existing databases to add the field `serializer_id int (4)`:
```
ALTER TABLE {your_event_journal_table_name} ADD COLUMN `serializer_id` INTEGER ( 4 )
ALTER TABLE {your_snapshot_table_name} ADD COLUMN `serializer_id` INTEGER ( 4 )
```</PackageReleaseNotes>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup>
<PackageReleaseNotes>Placeholder</PackageReleaseNotes>
</PropertyGroup>
</Project>

0 comments on commit 6a460ba

Please sign in to comment.