File: main.py

package info (click to toggle)
dpdk 24.11.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 121,148 kB
  • sloc: ansic: 2,206,055; python: 11,866; sh: 4,627; makefile: 2,025; awk: 70
file content (31 lines) | stat: -rwxr-xr-x 991 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
# Copyright(c) 2022 PANTHEON.tech s.r.o.
# Copyright(c) 2022 University of New Hampshire

"""The DTS executable."""

from framework import settings


def main() -> None:
    """Set DTS settings, then run DTS.

    The DTS settings are taken from the command line arguments and the environment variables.
    The settings object is stored in the module-level variable settings.SETTINGS which the entire
    framework uses. After importing the module (or the variable), any changes to the variable are
    not going to be reflected without a re-import. This means that the SETTINGS variable must
    be modified before the settings module is imported anywhere else in the framework.
    """
    settings.SETTINGS = settings.get_settings()

    from framework.runner import DTSRunner

    dts = DTSRunner()
    dts.run()


# Main program begins here
if __name__ == "__main__":
    main()