udevadm('trigger', '--settle', f'--action={action}', *args)
def setup_common():
+ # We usually show something in each test. So, let's break line to make the title of a test and output
+ # from the test mixed. Then, flush stream buffer and journals.
print()
+ sys.stdout.flush()
+ check_output('journalctl --sync')
def tear_down_common():
# 1. stop DHCP/RA servers
flush_routing_policy_rules()
flush_routes()
+ # 8. flush stream buffer and journals to make not any output from the test with the next one
+ sys.stdout.flush()
+ check_output('journalctl --sync')
+
def setUpModule():
rm_rf(networkd_ci_temp_dir)
cp_r(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'conf'), networkd_ci_temp_dir)
clear_system_units()
restore_active_units()
+ # Flush stream buffer and journals before showing the test summary.
+ sys.stdout.flush()
+ check_output('journalctl --sync')
+
class Utilities():
# pylint: disable=no-member