Skip to content

Commit

Permalink
Cleanup Scenarios to make it easier for TravisCI
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Aug 26, 2016
1 parent 412425e commit d447078
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions integrationtests/Paket.IntegrationTests/TestHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,27 @@ open FsUnit
open System
open System.IO

let scenarios = System.Collections.Generic.List<_>()

let paketToolPath = FullName(__SOURCE_DIRECTORY__ + "../../../bin/paket.exe")
let integrationTestPath = FullName(__SOURCE_DIRECTORY__ + "../../../integrationtests/scenarios")
let scenarioTempPath scenario = Path.Combine(integrationTestPath,scenario,"temp")
let originalScenarioPath scenario = Path.Combine(integrationTestPath,scenario,"before")

let cleanup scenario =
let scenarioPath = scenarioTempPath scenario
CleanDir scenarioPath

let cleanupAllScenarios() =
for scenario in scenarios do
cleanup scenario
scenarios.Clear()

let prepare scenario =
if scenarios.Count > 10 then
cleanupAllScenarios()

scenarios.Add scenario
let originalScenarioPath = originalScenarioPath scenario
let scenarioPath = scenarioTempPath scenario
CleanDir scenarioPath
Expand Down

0 comments on commit d447078

Please sign in to comment.