blob: 7c477903d6b3621d2d996b5225e010e5bdec1208 [file] [log] [blame]
Tom Rini7f24c192019-10-24 11:59:20 -04001#!/usr/bin/env python3
Tom Rini10e47792018-05-06 17:58:06 -04002# SPDX-License-Identifier: GPL-2.0
Stephen Warren10e50632016-01-15 11:15:24 -07003
4# Copyright (c) 2015 Stephen Warren
5# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
Stephen Warren10e50632016-01-15 11:15:24 -07006
7# Wrapper script to invoke pytest with the directory name that contains the
8# U-Boot tests.
9
10import os
11import os.path
12import sys
Heinrich Schuchardtceb4ca22021-01-28 12:46:11 +010013import pytest
Stephen Warren10e50632016-01-15 11:15:24 -070014
Tom Rini741e3932019-10-24 11:59:25 -040015if __name__ == '__main__':
Heinrich Schuchardtceb4ca22021-01-28 12:46:11 +010016 # argv; py.test test_directory_name user-supplied-arguments
17 args = [os.path.dirname(__file__) + '/tests']
18 args.extend(sys.argv)
Simon Glass19193482021-10-05 20:18:00 -060019
20 # Use short format by default
21 if not [arg for arg in args if '--tb=' in arg]:
22 args.append('--tb=short')
23
Heinrich Schuchardtceb4ca22021-01-28 12:46:11 +010024 sys.exit(pytest.main(args))