Add a -t option to run unit tests in this program. So far, there is none.
Signed-off-by: Simon Glass <sjg@chromium.org>
import collections
import copy
import difflib
+import doctest
import filecmp
import fnmatch
import glob
import tempfile
import threading
import time
+import unittest
from buildman import bsettings
from buildman import kconfiglib
(options, configs) = parser.parse_args()
+ if options.test:
+ sys.argv = [sys.argv[0]]
+ fail, count = doctest.testmod()
+ if fail:
+ return 1
+ unittest.main()
+
if len(configs) == 0 and not any((options.force_sync, options.build_db,
options.imply)):
parser.print_usage()