2019-10-24 11:59:20 -04:00
|
|
|
#!/usr/bin/env python3
|
2018-05-06 17:58:06 -04:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2016-01-15 11:15:24 -07: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 12:46:11 +01:00
|
|
|
import pytest
|
2019-10-24 11:59:25 -04:00
|
|
|
from pkg_resources import load_entry_point
|
2016-01-15 11:15:24 -07:00
|
|
|
|
2019-10-24 11:59:25 -04:00
|
|
|
if __name__ == '__main__':
|
2021-01-28 12:46:11 +01:00
|
|
|
# argv; py.test test_directory_name user-supplied-arguments
|
|
|
|
args = [os.path.dirname(__file__) + '/tests']
|
|
|
|
args.extend(sys.argv)
|
2021-10-05 20:18:00 -06:00
|
|
|
|
|
|
|
# Use short format by default
|
|
|
|
if not [arg for arg in args if '--tb=' in arg]:
|
|
|
|
args.append('--tb=short')
|
|
|
|
|
2021-01-28 12:46:11 +01:00
|
|
|
sys.exit(pytest.main(args))
|