<commit_before>version: '{build}'

branches:
  # blacklist
  except:
    - gh-pages

platform:
  - Win32
  - x64

configuration:
  - Debug_VldRelease
  - Debug_VldRelease_StaticCrt
  - Release
  - Release_StaticCrt

matrix:
  fast_finish: false

build_script:
- ps: >-
    Write-Output "Configuration: $env:CONFIGURATION"

    Write-Output "Platform: $env:PLATFORM"

    msbuild /v:m /p:"Configuration=$env:CONFIGURATION" /p:Platform="$env:PLATFORM" "vld_vs14.sln" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

test_script:
- ps: >-
    cd src\

    function Add-GTest-Result($testResult)
    {
        $testsuites = ([xml](get-content $testResult)).testsuites
        $anyFailures = $FALSE

        foreach ($testsuite in $testsuites.testsuite) {
            foreach ($testcase in $testsuite.testcase) {
                if ($testcase.failure) {
                    $time = ([double]$testcase.time * 1000)
                    Add-AppveyorTest $testcase.name -Outcome Failed -FileName $testsuite.name -Duration $time -ErrorMessage $testcase.failure.message
                    Add-AppveyorMessage "$($testcase.name) failed" -Category Error
                    $anyFailures = $TRUE
                }
                elseif ($testcase.skipped) {
                    Add-AppveyorTest $testcase.name -Outcome Ignored -Filename $testsuite.name
                }
                else {
                    $time = ([double]$testcase.time * 1000)
                    Add-AppveyorTest $testcase.name -Outcome Passed -FileName $testsuite.name -Duration $time
                }
            }
        }

        if ($anyFailures -eq $TRUE){
            Write-Output "Failing build as there are broken tests"
            $host.SetShouldExit(1)
        }
    }


    function Run-Tests($platform, $configuration)
    {
        $tests_path = ".\bin\$platform\$configuration\"
        $tests_path

        # Run tests and ipload results to AppVeyor one by one
        Get-ChildItem "$tests_path\*.exe" | foreach {
            $testfile = "$($_.FullName).xml"
            & $_.FullName "--gtest_output=`"xml:$testfile`""
            if (Test-Path $testfile)
            {
                Add-GTest-Result($testfile)
            }
        }
    }

    $folders = @{"Debug_VldRelease" = "Debug(Release)-v140"; "Debug_VldRelease_StaticCrt" = "Debug(Release)_StaticCrt-v140";
        "Release" = "Release-v140"; "Release_StaticCrt" = "Release_StaticCrt-v140"}
    Run-Tests "$env:PLATFORM" "$($folders[$env:CONFIGURATION])"
<commit_msg>Testing with VldStackWalkMethod = safe added<commit_after>version: '{build}'

branches:
  # blacklist
  except:
    - gh-pages

os: Visual Studio 2015

environment:
  GTEST_REPEAT: 1

  matrix:
  - VldStackWalkMethod: safe
  - VldStackWalkMethod: fast

platform:
  - Win32
  - x64

configuration:
  - Debug_VldRelease
  - Debug_VldRelease_StaticCrt
  - Release
  - Release_StaticCrt

matrix:
  fast_finish: false

build_script:
- ps: |
    Write-Output "Configuration: $env:CONFIGURATION"
    Write-Output "Platform: $env:PLATFORM"
    msbuild /v:m /p:"Configuration=$env:CONFIGURATION" /p:Platform="$env:PLATFORM" "vld_vs14.sln" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

test_script:
- ps: |
    cd src\

    function Add-GTest-Result($testResult)
    {
        $testsuites = ([xml](get-content $testResult)).testsuites
        $anyFailures = $FALSE

        foreach ($testsuite in $testsuites.testsuite) {
            foreach ($testcase in $testsuite.testcase) {
                if ($testcase.failure) {
                    $time = ([double]$testcase.time * 1000)
                    Add-AppveyorTest $testcase.name -Outcome Failed -FileName $testsuite.name -Duration $time -ErrorMessage $testcase.failure.message
                    Add-AppveyorMessage "$($testcase.name) failed" -Category Error
                    $anyFailures = $TRUE
                }
                elseif ($testcase.skipped) {
                    Add-AppveyorTest $testcase.name -Outcome Ignored -Filename $testsuite.name
                }
                else {
                    $time = ([double]$testcase.time * 1000)
                    Add-AppveyorTest $testcase.name -Outcome Passed -FileName $testsuite.name -Duration $time
                }
            }
        }
        return $anyFailures
    }


    function Run-Tests($platform, $configuration)
    {
        $anyFailures = $FALSE
        $tests_path = ".\bin\$platform\$configuration\"

        # Run tests and upload results to AppVeyor one by one
        Get-ChildItem "$tests_path\*.exe" | foreach {
            $testfile = "$($_.FullName).xml"
            & $_.FullName "--gtest_output=`"xml:$testfile`""
            if (Test-Path $testfile)
            {
                $testsResult = Add-GTest-Result $testfile
                $anyFailures = $anyFailures -or $testsResult
            }
        }

        if ($anyFailures -eq $TRUE){
            Write-Output "Failing build as there are broken tests"
            $host.SetShouldExit(1)
        }
    }

    $folders = @{"Debug_VldRelease" = "Debug(Release)-v140"; "Debug_VldRelease_StaticCrt" = "Debug(Release)_StaticCrt-v140";
        "Release" = "Release-v140"; "Release_StaticCrt" = "Release_StaticCrt-v140"}
    Run-Tests "$env:PLATFORM" "$($folders[$env:CONFIGURATION])"

{'fraction_non_alphanumeric': 0.12049318139361107, 'fraction_numerical': 0.0110218569026714, 'mean_word_length': 2.145710928319624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1815804', 'n_tokens_mistral': 1736, 'n_tokens_neox': 1624, 'n_words': 315}