blob: bee88d96bc2629cf21ba84bd38db5bd8586f304d [file] [log] [blame]
Tom Rinife1193e2019-10-24 11:59:20 -04001#!/usr/bin/env python3
Tom Rini83d290c2018-05-06 17:58:06 -04002# SPDX-License-Identifier: GPL-2.0
Stephen Warrend2015062016-01-15 11:15:24 -07003
4# Copyright (c) 2015 Stephen Warren
5# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
Stephen Warrend2015062016-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
Tom Rini8add4fa2019-10-24 11:59:25 -040013from pkg_resources import load_entry_point
Stephen Warrend2015062016-01-15 11:15:24 -070014
15# argv; py.test test_directory_name user-supplied-arguments
Tom Rini8add4fa2019-10-24 11:59:25 -040016args = [os.path.dirname(__file__) + '/tests']
Stephen Warrend2015062016-01-15 11:15:24 -070017args.extend(sys.argv)
18
Tom Rini8add4fa2019-10-24 11:59:25 -040019if __name__ == '__main__':
20 sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))