23 lines
911 B
Python
23 lines
911 B
Python
|
import argparse
|
||
|
import unittest
|
||
|
import tests
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
# handle custom CLI arguments
|
||
|
parser = argparse.ArgumentParser(add_help=False)
|
||
|
parser.add_argument('--keep-failed', action='store_true',
|
||
|
help='whether to keep output files of failed tests')
|
||
|
parser.add_argument('--visual', action='store_true',
|
||
|
help='whether to show plots, helps with debugging')
|
||
|
parser.add_argument('--update', action='store_true',
|
||
|
help='update the reference results with the'
|
||
|
'current ones')
|
||
|
parser.add_argument('--binary', type=str, default='build/bin/gray',
|
||
|
help='the gray binary to be tested')
|
||
|
options, other_args = parser.parse_known_args()
|
||
|
tests.options = options
|
||
|
|
||
|
# start the test runner
|
||
|
unittest.main(module=None, argv=["tests.main"] + other_args)
|