mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 22:23:38 -07:00
display return values from commands and compare them with value. as promised in #440
This commit is contained in:
parent
3851172d81
commit
3240a3a579
1 changed files with 26 additions and 3 deletions
29
appveyor.yml
29
appveyor.yml
|
@ -175,7 +175,7 @@ test_script:
|
||||||
$global:TestsPassed=$true
|
$global:TestsPassed=$true
|
||||||
|
|
||||||
|
|
||||||
Function ExecTest($Name, $File, $Cmd) {
|
Function ExecTest($Name, $File, $Cmd, $CheckResult) {
|
||||||
|
|
||||||
#--- begin Job
|
#--- begin Job
|
||||||
|
|
||||||
|
@ -191,6 +191,21 @@ test_script:
|
||||||
$Cond=&$sb
|
$Cond=&$sb
|
||||||
|
|
||||||
if ($Cond -eq $null){
|
if ($Cond -eq $null){
|
||||||
|
} ElseIf($using:CheckResult -ne $null) {
|
||||||
|
[String]$searchstr=""
|
||||||
|
if ($Cond -is [Object]){
|
||||||
|
ForEach($line in $Cond){
|
||||||
|
Write-host $line -ForegroundColor Gray
|
||||||
|
$searchstr += $line
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
Write-host "$Cond" -ForegroundColor Gray
|
||||||
|
$searchstr = $Cond
|
||||||
|
}
|
||||||
|
If($searchstr -like "*$using:CheckResult*") {
|
||||||
|
$res=$true
|
||||||
|
}
|
||||||
|
$Cond="*$using:CheckResult*"
|
||||||
} Else {
|
} Else {
|
||||||
If (!($Cond -is [bool] -or $Cond -is [byte] -or $Cond -is [int16] -or $Cond -is [int32] -or $Cond -is [int64] -or $Cond -is [float])){
|
If (!($Cond -is [bool] -or $Cond -is [byte] -or $Cond -is [int16] -or $Cond -is [int32] -or $Cond -is [int64] -or $Cond -is [float])){
|
||||||
if ($Cond -is "String" -and $Cond -like "*passed*"){
|
if ($Cond -is "String" -and $Cond -like "*passed*"){
|
||||||
|
@ -258,9 +273,9 @@ test_script:
|
||||||
ExecTest "proxmark help hardnested" "proxmark3 -h" {bash -lc 'cd ~/client;proxmark3 -h | grep -q hardnested && echo Passed || echo Failed'}
|
ExecTest "proxmark help hardnested" "proxmark3 -h" {bash -lc 'cd ~/client;proxmark3 -h | grep -q hardnested && echo Passed || echo Failed'}
|
||||||
|
|
||||||
|
|
||||||
ExecTest "hf mf offline text" "hf mf" {bash -lc "cd ~/client;proxmark3 comx -c 'hf mf' | grep -q at_enc && echo Passed || echo Failed"}
|
ExecTest "hf mf offline text" "hf mf" {bash -lc "cd ~/client;proxmark3 comx -c 'hf mf'"} "at_enc"
|
||||||
|
|
||||||
ExecTest "hf mf hardnested" "hf mf hardnested" {bash -lc "cd ~/client;proxmark3 comx -c 'hf mf hardnested t 1 000000000000' | grep -q 'found:' && echo Passed || echo Failed"}
|
ExecTest "hf mf hardnested" "hf mf hardnested" {bash -lc "cd ~/client;proxmark3 comx -c 'hf mf hardnested t 1 000000000000'"} "found:"
|
||||||
|
|
||||||
|
|
||||||
if ($global:TestsPassed) {
|
if ($global:TestsPassed) {
|
||||||
|
@ -269,6 +284,14 @@ test_script:
|
||||||
Write-Host "Tests [ ERROR ]" -ForegroundColor Red
|
Write-Host "Tests [ ERROR ]" -ForegroundColor Red
|
||||||
throw "Tests error."
|
throw "Tests error."
|
||||||
}
|
}
|
||||||
|
deploy:
|
||||||
|
- provider: GitHub
|
||||||
|
auth_token:
|
||||||
|
secure: KZjT7cUmFdoKLAauWthn+eUVqe46uXLYEmLoZ9MiPfPzY2VD7xzKg9cXrwxm0Z4O
|
||||||
|
force_update: true
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
appveyor_repo_tag: true
|
||||||
on_success:
|
on_success:
|
||||||
- ps: Write-Host "Build success..." -ForegroundColor Green
|
- ps: Write-Host "Build success..." -ForegroundColor Green
|
||||||
on_failure:
|
on_failure:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue