aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api-test/scripts/vppctl
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-api-test/scripts/vppctl')
-rwxr-xr-xvpp-api-test/scripts/vppctl6
1 files changed, 5 insertions, 1 deletions
diff --git a/vpp-api-test/scripts/vppctl b/vpp-api-test/scripts/vppctl
index 160bdf7c..6dfa3b9b 100755
--- a/vpp-api-test/scripts/vppctl
+++ b/vpp-api-test/scripts/vppctl
@@ -42,8 +42,12 @@ class Vppctl(Cmd):
input_command = input_prefix + line
line_remove = '^load_one_plugin:'
s = '\n'
+ command = ['vpp_api_test']
- vpp_process = subprocess.Popen(['sudo', 'vpp_api_test'],
+ if os.geteuid() != 0:
+ command = ['sudo', 'vpp_api_test']
+
+ vpp_process = subprocess.Popen(command,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE)