Merge tag 'dm-pull-29oct19' of git://git.denx.de/u-boot-dm
[oweals/u-boot.git] / test / py / test.py
1 #!/usr/bin/env python3
2 # SPDX-License-Identifier: GPL-2.0
3
4 # Copyright (c) 2015 Stephen Warren
5 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
6
7 # Wrapper script to invoke pytest with the directory name that contains the
8 # U-Boot tests.
9
10 import os
11 import os.path
12 import sys
13 from pkg_resources import load_entry_point
14
15 # argv; py.test test_directory_name user-supplied-arguments
16 args = [os.path.dirname(__file__) + '/tests']
17 args.extend(sys.argv)
18
19 if __name__ == '__main__':
20     sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))