aboutsummaryrefslogtreecommitdiffstats
path: root/dist/windows/appveyor/test.ps1
diff options
context:
space:
mode:
Diffstat (limited to 'dist/windows/appveyor/test.ps1')
-rw-r--r--dist/windows/appveyor/test.ps1121
1 files changed, 0 insertions, 121 deletions
diff --git a/dist/windows/appveyor/test.ps1 b/dist/windows/appveyor/test.ps1
deleted file mode 100644
index 65045f889..000000000
--- a/dist/windows/appveyor/test.ps1
+++ /dev/null
@@ -1,121 +0,0 @@
-function Restore-NativeCommandStream
-{ <#
- .SYNOPSIS
- This CmdLet gathers multiple ErrorRecord objects and reconstructs outputs
- as a single line.
-
- .DESCRIPTION
- This CmdLet collects multiple ErrorRecord objects and emits one String
- object per line.
- .PARAMETER InputObject
- A object stream is required as an input.
- .PARAMETER Indent
- Indentation string.
- #>
- [CmdletBinding()]
- param(
- [Parameter(ValueFromPipeline=$true)]
- $InputObject
- )
-
- begin
- { $LineRemainer = "" }
-
- process
- { if ($InputObject -is [System.Management.Automation.ErrorRecord])
- { if ($InputObject.FullyQualifiedErrorId -eq "NativeCommandError")
- { Write-Output $InputObject.ToString() }
- elseif ($InputObject.FullyQualifiedErrorId -eq "NativeCommandErrorMessage")
- { $NewLine = $LineRemainer + $InputObject.ToString()
- while (($NewLinePos = $NewLine.IndexOf("`n")) -ne -1)
- { Write-Output $NewLine.Substring(0, $NewLinePos)
- $NewLine = $NewLine.Substring($NewLinePos + 1)
- }
- $LineRemainer = $NewLine
- }
- }
- elseif ($InputObject -is [String])
- { Write-Output $InputObject }
- else
- { Write-Host "Unsupported object in pipeline stream" }
- }
-
- end
- { if ($LineRemainer -ne "")
- { Write-Output $LineRemainer }
- }
-}
-
-Write-Host "Run testsuites..." -Foreground Yellow
-cd "$($env:APPVEYOR_BUILD_FOLDER)\testsuite"
-# Use a MinGW compatible path
-$env:GHDL="$($env:GHDL_PREFIX_DIR)/bin/ghdl.exe"
-
-# Exit status
-$Err = 0
-
-# =============================================================================
-$TestFramework = "GNA"
-Write-Host "Running GNA tests..." -Foreground Yellow
-cd gna
-
-$Directories = dir -Directory *
-foreach ($Directory in $Directories)
-{ $TestName = "GNA test: {0}" -f $Directory.Name
- $FileName = $Directory.Name
-
- Write-Host $TestName -Foreground Yellow
- cd $Directory
- Add-AppveyorTest -Name $TestName -Framework $TestFramework -FileName $FileName -Outcome Running
- $start = Get-Date
- c:\msys64\usr\bin\bash.exe -c "./testsuite.sh" 2>&1 | Restore-NativeCommandStream | %{ "$_" }
- $end = Get-Date
- $TotalMilliseconds = ($end - $start).TotalMilliseconds
- if ($LastExitCode -eq 0)
- { Write-Host "PASSED" -Foreground Green
- Update-AppveyorTest -Name $TestName -Framework $TestFramework -FileName $FileName -Outcome Passed -Duration $TotalMilliseconds
- }
- else
- { Write-Host "FAILED" -Foreground Red
- Update-AppveyorTest -Name $TestName -Framework $TestFramework -FileName $FileName -Outcome Failed -Duration $TotalMilliseconds
- $Err = 1
- }
-}
-cd ..\..
-
-# =============================================================================
-$TestFramework = "VESTS"
-Write-Host "Running VESTS tests..." -Foreground Yellow
-
-cd vests
-
-$TestName = "VESTS test:" # {0}" -f $Directory
-$FileName = "VESTS" #$Directory
-
-Write-Host $TestName -Foreground Yellow
-# Disable vests. It works but takes ~20 min
-if ($true)
-{ Add-AppveyorTest -Name $TestName -Framework $TestFramework -FileName $FileName -Outcome Skipped
- $start = Get-Date
-}
-else
-{ Add-AppveyorTest -Name $TestName -Framework $TestFramework -FileName $FileName -Outcome Running
- $start = Get-Date
- c:\msys64\usr\bin\bash.exe -c "./testsuite.sh" 2>&1 | Restore-NativeCommandStream | %{ "$_" }
- $end = Get-Date
- $TotalMilliseconds = ($end - $start).TotalMilliseconds
- if ($LastExitCode -eq 0)
- { Write-Host "PASSED" -Foreground Green
- Update-AppveyorTest -Name $TestName -Framework $TestFramework -FileName $FileName -Outcome Passed -Duration $TotalMilliseconds
- }
- else
- { Write-Host "FAILED" -Foreground Red
- Update-AppveyorTest -Name $TestName -Framework $TestFramework -FileName $FileName -Outcome Failed -Duration $TotalMilliseconds
- $Err = 1
- }
- cd ..
-}
-
-# =============================================================================
-cd $env:APPVEYOR_BUILD_FOLDER
-exit $Err