bench: default is LAN-only, --unlimited and --wan for exclusive profiles
This commit is contained in:
@@ -341,12 +341,10 @@ def main():
|
|||||||
help="Destination directory for received files (default: %(default)s)")
|
help="Destination directory for received files (default: %(default)s)")
|
||||||
parser.add_argument("--keep-data", action="store_true",
|
parser.add_argument("--keep-data", action="store_true",
|
||||||
help="Keep test_data directory after run")
|
help="Keep test_data directory after run")
|
||||||
parser.add_argument("--no-unlimited", action="store_true",
|
parser.add_argument("--unlimited", action="store_true",
|
||||||
help="Skip the Unlimited (no limits) profile")
|
help="Run Unlimited profile instead of LAN (no network limits)")
|
||||||
parser.add_argument("--no-lan", action="store_true",
|
|
||||||
help="Skip the LAN profile")
|
|
||||||
parser.add_argument("--wan", action="store_true",
|
parser.add_argument("--wan", action="store_true",
|
||||||
help="Include the WAN profile (requires sudo)")
|
help="Run WAN profile instead of LAN (100mbit, 50ms, 1% loss)")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
os.system("cmake -B build -S . > /dev/null 2>&1")
|
os.system("cmake -B build -S . > /dev/null 2>&1")
|
||||||
@@ -359,17 +357,12 @@ def main():
|
|||||||
os.makedirs(args.dest_dir, exist_ok=True)
|
os.makedirs(args.dest_dir, exist_ok=True)
|
||||||
|
|
||||||
profiles_to_run = []
|
profiles_to_run = []
|
||||||
if args.wan:
|
if args.unlimited:
|
||||||
if not args.no_unlimited:
|
profiles_to_run.append("Unlimited")
|
||||||
profiles_to_run.append("WAN")
|
elif args.wan:
|
||||||
else:
|
profiles_to_run.append("WAN")
|
||||||
print("--wan and --no-unlimited are mutually exclusive")
|
|
||||||
sys.exit(1)
|
|
||||||
else:
|
else:
|
||||||
if not args.no_unlimited:
|
profiles_to_run.append("LAN")
|
||||||
profiles_to_run.append("Unlimited")
|
|
||||||
if not args.no_lan:
|
|
||||||
profiles_to_run.append("LAN")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
all_results = []
|
all_results = []
|
||||||
|
|||||||
Reference in New Issue
Block a user