#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Host unit-test runner for the IEC104 netTask service adapter.""" import os import sys HERE = os.path.dirname(os.path.abspath(__file__)) ROOT = os.path.dirname(os.path.dirname(os.path.dirname(HERE))) sys.path.insert(0, os.path.join(ROOT, "test", "host", "common")) from unit_test_harness import TestBuild, run_host_unit_test # noqa: E402 BUILD = TestBuild( name="IEC104 Serv Tests", src=os.path.join(HERE, "iec104_serv_test.c"), include_dirs=[ os.path.join(HERE, "stub"), os.path.join(ROOT, "App", "task"), os.path.join(ROOT, "App", "iec60870", "104"), os.path.join(ROOT, "App", "iec60870", "common"), os.path.join(ROOT, "App", "iec60870", "104"), os.path.join(ROOT, "App", "iec60870", "104", "business"), os.path.join(ROOT, "App", "iec60870", "platform"), os.path.join(ROOT, "App", "iec60870", "examples"), os.path.join(ROOT, "App", "algo"), os.path.join(ROOT, "App", "sync"), os.path.join(ROOT, "App", "util"), os.path.join(ROOT, "App", "app"), os.path.join(ROOT, "App", "cfg"), HERE, ], summary_marker="=== IEC104 Serv Tests:", ) if __name__ == "__main__": sys.exit(run_host_unit_test(BUILD))