2023-04-27 21:55:04 +00:00
|
|
|
Index: glances-3.3.1/unitest-restful.py
|
|
|
|
|
===================================================================
|
|
|
|
|
--- glances-3.3.1.orig/unitest-restful.py
|
|
|
|
|
+++ glances-3.3.1/unitest-restful.py
|
2022-07-28 20:38:11 +00:00
|
|
|
@@ -12,6 +12,7 @@
|
2020-05-07 13:03:48 +00:00
|
|
|
|
|
|
|
|
import shlex
|
|
|
|
|
import subprocess
|
|
|
|
|
+import sys
|
|
|
|
|
import time
|
|
|
|
|
import numbers
|
|
|
|
|
import unittest
|
2023-04-27 21:55:04 +00:00
|
|
|
@@ -58,7 +59,7 @@ class TestGlances(unittest.TestCase):
|
|
|
|
|
if os.path.isfile("./venv/bin/python"):
|
|
|
|
|
cmdline = "./venv/bin/python"
|
|
|
|
|
else:
|
|
|
|
|
- cmdline = "python"
|
|
|
|
|
+ cmdline = sys.executable
|
|
|
|
|
cmdline += " -m glances -B localhost -w -p %s" % SERVER_PORT
|
2020-05-07 13:03:48 +00:00
|
|
|
print("Run the Glances Web Server on port %s" % SERVER_PORT)
|
|
|
|
|
args = shlex.split(cmdline)
|
2023-04-27 21:55:04 +00:00
|
|
|
Index: glances-3.3.1/unitest-xmlrpc.py
|
|
|
|
|
===================================================================
|
|
|
|
|
--- glances-3.3.1.orig/unitest-xmlrpc.py
|
|
|
|
|
+++ glances-3.3.1/unitest-xmlrpc.py
|
2022-07-28 20:38:11 +00:00
|
|
|
@@ -13,6 +13,7 @@
|
2020-05-07 13:03:48 +00:00
|
|
|
import json
|
|
|
|
|
import shlex
|
|
|
|
|
import subprocess
|
|
|
|
|
+import sys
|
|
|
|
|
import time
|
|
|
|
|
import unittest
|
2023-04-27 21:55:04 +00:00
|
|
|
import os
|
|
|
|
|
@@ -47,7 +48,7 @@ class TestGlances(unittest.TestCase):
|
|
|
|
|
if os.path.isfile("./venv/bin/python"):
|
|
|
|
|
cmdline = "./venv/bin/python"
|
|
|
|
|
else:
|
|
|
|
|
- cmdline = "python"
|
|
|
|
|
+ cmdline = sys.executable
|
|
|
|
|
cmdline += " -m glances -B localhost -s -p %s" % SERVER_PORT
|
2020-05-07 13:03:48 +00:00
|
|
|
print("Run the Glances Server on port %s" % SERVER_PORT)
|
|
|
|
|
args = shlex.split(cmdline)
|