Skip to content
Snippets Groups Projects
Commit 24ffd5c9 authored by Robin.Mueller's avatar Robin.Mueller
Browse files

improved structure a bit

parent 39fa3988
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,6 @@ Run this file with the -h flag to display options.
"""
import atexit
import time
import unittest
import logging
import sys
from collections import deque
......@@ -36,6 +35,7 @@ from typing import Tuple, Union
from config import obsw_config as g
from config.obsw_config import set_globals
from config.obsw_com_config import set_communication_interface
from tmtc_core.tc.obsw_pus_tc_base import PusTcInfo
from tmtc_core.sendreceive.obsw_single_command_sender_receiver import SingleCommandSenderReceiver
......@@ -44,9 +44,8 @@ from tmtc_core.sendreceive.obsw_tm_listener import TmListener
from tmtc_core.utility.obsw_tmtc_printer import TmTcPrinter
from tmtc_core.utility.obsw_exit_handler import keyboard_interrupt_handler
from tmtc_core.utility.obsw_logger import set_tmtc_logger, get_logger
from config.obsw_com_config import set_communication_interface
from test import obsw_pus_service_test
from test.obsw_pus_service_test import run_selected_pus_tests
from tc.obsw_pus_tc_packer import create_total_tc_queue, ServiceQueuePacker
from utility.obsw_args_parser import parse_input_arguments
from utility.obsw_binary_uploader import perform_binary_upload
......@@ -214,18 +213,7 @@ class TmTcHandler:
g.G_COM_INTERFACE = self.communication_interface
g.G_TMTC_PRINTER = self.tmtc_printer
LOGGER.info("Performing module tests")
# noinspection PyTypeChecker
suite = unittest.TestLoader().loadTestsFromName("TestService17", obsw_pus_service_test)
unittest.TextTestRunner(verbosity=2).run(suite)
# noinspection PyTypeChecker
suite = unittest.TestLoader().loadTestsFromName("TestService5", obsw_pus_service_test)
unittest.TextTestRunner(verbosity=2).run(suite)
# noinspection PyTypeChecker
suite = unittest.TestLoader().loadTestsFromName("TestService2", obsw_pus_service_test)
unittest.TextTestRunner(verbosity=2).run(suite)
# noinspection PyTypeChecker
suite = unittest.TestLoader().loadTestsFromName("TestService8", obsw_pus_service_test)
unittest.TextTestRunner(verbosity=2).run(suite)
run_selected_pus_tests()
else:
logging.error("Unknown Mode, Configuration error !")
......
......@@ -18,6 +18,19 @@ from tmtc_core.utility.obsw_logger import get_logger
LOGGER = get_logger()
def run_selected_pus_tests():
suite = unittest.TestLoader().loadTestsFromTestCase(TestService17)
unittest.TextTestRunner(verbosity=2).run(suite)
suite = unittest.TestLoader().loadTestsFromTestCase(TestService5)
unittest.TextTestRunner(verbosity=2).run(suite)
suite = unittest.TestLoader().loadTestsFromTestCase(TestService2)
unittest.TextTestRunner(verbosity=2).run(suite)
suite = unittest.TestLoader().loadTestsFromTestCase(TestService8)
unittest.TextTestRunner(verbosity=2).run(suite)
suite = unittest.TestLoader().loadTestsFromTestCase(TestService200)
unittest.TextTestRunner(verbosity=2).run(suite)
class TestService2(TestService):
"""
Test raw commanding service.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment