Beispiel #1
0
if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('test', nargs='*')
    parser.add_argument('-v',
                        '--verbose',
                        action='store_true',
                        help='Verbose output')
    parser.add_argument('--quiet',
                        action='store_true',
                        default=False,
                        help='no output unless one or more tests fail')
    parser.add_argument('--debug',
                        action='store_true',
                        help='Run test and wait for gdb connect')
    parser.add_argument('-p', '--platform', default='stm32p103')
    parser.add_argument('--qemu', default='qemu-system-arm')
    parser.add_argument('--cc', default='arm-none-eabi-gcc')
    parser.add_argument('--timeout', type=int, default=60)
    parser.add_argument('--slowest',
                        action='store_true',
                        dest='print_slow',
                        help='print the slowest 10 tests')

    ns = parser.parse_args()
    if ns.test:
        PikoTest().main(ns.test, ns)
    else:
        # This will include all test
        runner.main(ns)
Beispiel #2
0
    def run_tests(self):
        from tests.runner import main

        test_labels = self.test_labels.split()
        djtest_args = self.djtest_args.split()
        main(['runner.py', 'test'] + test_labels + djtest_args)
Beispiel #3
0
import argparse
import tests.runner as runner

if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('test', nargs='*')
    parser.add_argument('-v',
                        '--verbose',
                        action='store_true',
                        help='Verbose output')
    parser.add_argument('--debug',
                        action='store_true',
                        help='Run test and wait for gdb connect')

    args = parser.parse_args()
    if args.test:
        runner.run_test(args.test, args.verbose, debug=args.debug)
    else:
        runner.main(args.verbose)