#!/usr/bin/env python3

import sys
import os

MODULES_INTEL = "e1000 e1000e igb ixgb ixgbe ixgbevf i40e i40evf"
MODULES_ACCEL_PPP = "ipoe"
MODULES_MISC = "wireguard"

modules = {
  "intel": ["e1000", "e1000e", "igb", "ixgb", "ixgbe", "ixgbevf", "i40e", "i40evf"],
  "accel_ppp": ["ipoe"],
  "misc": ["wireguard"]
}

if __name__ == '__main__':
    success = True

    print("[load modules] Test execution started")
    for msk in modules:
        ms = modules[msk]
        for m in ms:
            # We want to uncover all modules that fail,
            # not fail at the first one
            try:
                os.system("modprobe {0}".format(m))
            except Exception as e:
                print("[load modules] Test [modprobe {0}] failed: {1}".format(module, e))
                success = False

    if not success:
        print("Test [load modules] failed")
        sys.exit(1)
    else:
        print("[load modules] Test succeeded")

@@ -43,129 +43,8 @@
 os%0A%0A
-MODULES_INTEL = %22e1000 e1000e igb ixgb ixgbe ixgbevf i40e i40evf%22%0AMODULES_ACCEL_PPP = %22ipoe%22%0AMODULES_MISC = %22wireguard%22%0A%0A
 modu

Remove unncesessary lines.