2019-10-24 15:59:20 +00:00
|
|
|
#!/usr/bin/env python3
|
2018-05-06 21:58:06 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2016-01-15 18:15:24 +00:00
|
|
|
|
|
|
|
# Copyright (c) 2015 Stephen Warren
|
|
|
|
# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
|
|
|
|
# Wrapper script to invoke pytest with the directory name that contains the
|
|
|
|
# U-Boot tests.
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import sys
|
2021-01-28 11:46:11 +00:00
|
|
|
import pytest
|
2019-10-24 15:59:25 +00:00
|
|
|
from pkg_resources import load_entry_point
|
2016-01-15 18:15:24 +00:00
|
|
|
|
2019-10-24 15:59:25 +00:00
|
|
|
if __name__ == '__main__':
|
2021-01-28 11:46:11 +00:00
|
|
|
# argv; py.test test_directory_name user-supplied-arguments
|
|
|
|
args = [os.path.dirname(__file__) + '/tests']
|
|
|
|
args.extend(sys.argv)
|
2021-10-06 02:18:00 +00:00
|
|
|
|
|
|
|
# Use short format by default
|
|
|
|
if not [arg for arg in args if '--tb=' in arg]:
|
|
|
|
args.append('--tb=short')
|
|
|
|
|
2021-01-28 11:46:11 +00:00
|
|
|
sys.exit(pytest.main(args))
|