1#!/usr/bin/env python3 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright(c) 2010-2014 Intel Corporation 4# Copyright(c) 2022 PANTHEON.tech s.r.o. 5# Copyright(c) 2022 University of New Hampshire 6 7"""The DTS executable.""" 8 9import logging 10 11from framework import settings 12 13 14def main() -> None: 15 """Set DTS settings, then run DTS. 16 17 The DTS settings are taken from the command line arguments and the environment variables. 18 The settings object is stored in the module-level variable settings.SETTINGS which the entire 19 framework uses. After importing the module (or the variable), any changes to the variable are 20 not going to be reflected without a re-import. This means that the SETTINGS variable must 21 be modified before the settings module is imported anywhere else in the framework. 22 """ 23 settings.SETTINGS = settings.get_settings() 24 from framework import dts 25 26 dts.run_all() 27 28 29# Main program begins here 30if __name__ == "__main__": 31 logging.raiseExceptions = True 32 main() 33