]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - appveyor.yml
transactions MSD and M/Chip, qVSDC works
[proxmark3-svn] / appveyor.yml
index b072335a30f6e2273e2ce8519d479ca287da139a..eb22114e7afd28ce45e9aebc357b9b1fe648268a 100644 (file)
@@ -175,7 +175,7 @@ test_script:
     $global:TestsPassed=$true
 
 
-    Function ExecTest($Name, $File, $Cmd) {
+    Function ExecTest($Name, $File, $Cmd, $CheckResult) {
 
     #--- begin Job
 
@@ -189,9 +189,23 @@ test_script:
       #execute scriptblock
       Write-host "Test [$using:Name] job: $using:Cmd"
       $Cond=&$sb
-      Write-host "Result[$using:Name]: $Cond"
 
       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 {
         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*"){
@@ -206,8 +220,10 @@ test_script:
       }
 
       If ($res) {
+        Write-host "Result[$using:Name]: $Cond" -ForegroundColor Green
         Add-AppveyorTest -Name "$using:Name" -Framework NUnit -Filename "$using:File" -Outcome Passed -Duration "$([System.Environment]::TickCount-$TestTime)"
       }Else {
+        Write-host "Result[$using:Name]: $Cond" -ForegroundColor Red
         Add-AppveyorTest -Name "$using:Name" -Framework NUnit -Filename "$using:File" -Outcome Failed -Duration "$([System.Environment]::TickCount-$TestTime)" -ErrorMessage "command:$using:Cmd`nresult:$Cond"
       }
         return $res
@@ -257,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 "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) {
Impressum, Datenschutz