meta-phosphor: run-ptest: fix shellcheck issues

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iaefc691917edf1342854fa4ea0950283a7d175c8
diff --git a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest
index f2a522a..49d8d21 100644
--- a/meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest
+++ b/meta-phosphor/recipes-phosphor/interfaces/bmcweb/run-ptest
@@ -1,8 +1,7 @@
 #!/bin/sh
 
-for i in `ls test/*_test`; do
-    $i
-    if [ $? -eq 0 ]; then
+for i in test/*_test; do
+    if $i ; then
         echo "PASS: $i"
     else
         echo "FAIL: $i"