Added skip message support
Emit message to stderr when skipping a test depending on verbosity
level. Report number of tests skipped at end of test run.
diff --git a/tests/oft b/tests/oft
index c4b1491..f7b72f0 100755
--- a/tests/oft
+++ b/tests/oft
@@ -124,6 +124,8 @@
import time
import os
+import testutils
+
try:
import scapy.all as scapy
except:
@@ -496,5 +498,11 @@
if __name__ == "__main__":
logging.info("*** TEST RUN START: " + time.asctime())
unittest.TextTestRunner(verbosity=_verb).run(suite)
+ if testutils.skipped_test_count > 0:
+ ts = " tests"
+ if testutils.skipped_test_count == 1: ts = " test"
+ logging.info("Skipped " + str(testutils.skipped_test_count) + ts)
+ print("Skipped " + str(testutils.skipped_test_count) + ts)
logging.info("*** TEST RUN END : " + time.asctime())
+