forked from libyal/libevtx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worked on tests and Windows test scripts.
- Loading branch information
1 parent
2dbd57a
commit 166602c
Showing
9 changed files
with
199 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,6 @@ before_build: | |
build: | ||
project: vs2010\libevtx.sln | ||
|
||
test_script: | ||
- ps: .\runtests.ps1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Script that runs the tests | ||
# | ||
# Version: 20160913 | ||
|
||
$ExitSuccess = 0 | ||
$ExitFailure = 1 | ||
$ExitIgnore = 77 | ||
|
||
Set-Location -Path "tests" | ||
|
||
Try | ||
{ | ||
$Lines = Get-Content "Makefile.am" | ||
$InTests = $FALSE | ||
|
||
foreach (${Line} in ${Lines}) | ||
{ | ||
If (${InTests}) | ||
{ | ||
If (-Not ${Line}) | ||
{ | ||
${InTests} = $FALSE | ||
|
||
Continue | ||
} | ||
${Line} = ${Line}.TrimStart() | ||
|
||
If (${Line}.EndsWith(" \")) | ||
{ | ||
${Line} = ${Line}.Substring(0, ${Line}.Length - 2) | ||
} | ||
If (${Line}.EndsWith(".sh")) | ||
{ | ||
${Line} = ${Line}.Substring(0, ${Line}.Length - 3) | ||
${Line} = ".\${Line}.ps1" | ||
} | ||
Invoke-Expression ${Line} | ||
|
||
if (${LastExitCode} -ne ${ExitSuccess}) | ||
{ | ||
Break | ||
} | ||
} | ||
ElseIf (${Line}.StartsWith("TESTS = ")) | ||
{ | ||
${InTests} = $TRUE | ||
} | ||
} | ||
} | ||
Catch | ||
{ | ||
${LastExitCode} = ${ExitFailure} | ||
} | ||
Finally | ||
{ | ||
Set-Location -Path ".." | ||
} | ||
|
||
Exit ${LastExitCode} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Library API functions testing script | ||
# | ||
# Version: 20160912 | ||
|
||
$ExitSuccess = 0 | ||
$ExitFailure = 1 | ||
$ExitIgnore = 77 | ||
|
||
$TestPrefix = Split-Path -path ${Pwd}.Path -parent | ||
$TestPrefix = Split-Path -path ${TestPrefix} -leaf | ||
$TestPrefix = ${TestPrefix}.Substring(3) | ||
|
||
$TestFunctions = "get_version error" -split " " | ||
|
||
$TestToolDirectory = "..\vs2010\Release" | ||
|
||
Function TestAPIFunction | ||
{ | ||
param( [string]$TestFunction, [string[]]$Options, [string]$Profile ) | ||
|
||
$TestExecutable = "${TestToolDirectory}\${TestPrefix}_test_${TestFunction}.exe" | ||
|
||
Invoke-Expression ${TestExecutable} | ||
} | ||
|
||
Foreach (${TestFunction} in ${TestFunctions}) | ||
{ | ||
TestAPIFunction ${TestFunction} | ||
|
||
if (${LastExitCode} -ne ${ExitSuccess}) | ||
{ | ||
Break | ||
} | ||
} | ||
|
||
Exit ${LastExitCode} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters