-
-
Notifications
You must be signed in to change notification settings - Fork 228
Expand file tree
/
Copy pathruntests.py
More file actions
executable file
·24 lines (20 loc) · 707 Bytes
/
runtests.py
File metadata and controls
executable file
·24 lines (20 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, "tests")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "openwisp2.settings")
if __name__ == "__main__":
from django.core.management import execute_from_command_line
args = sys.argv
args.insert(1, "test")
if not os.environ.get("SAMPLE_APP", False):
args.insert(2, "openwisp2.integrations")
args.insert(3, "openwisp_radius")
else:
args.insert(2, "openwisp2")
if os.environ.get("MONITORING_INTEGRATION", False):
args.extend(["--tag", "radius_monitoring"])
else:
args.extend(["--exclude-tag", "radius_monitoring"])
execute_from_command_line(args)