compat.sh: return $? in option --list-test-case to handle error case

Signed-off-by: Yanray Wang <yanray.wang@arm.com>
diff --git a/tests/compat.sh b/tests/compat.sh
index ff621fc..68c10c3 100755
--- a/tests/compat.sh
+++ b/tests/compat.sh
@@ -174,7 +174,7 @@
             # if you have to modify option, --list-test-case
             --list-test-case)
                 list_test_case
-                exit 0
+                exit $?
                 ;;
             -h|--help)
                 print_usage