2022-07-28 20:38:11 +00:00
|
|
|
diff -ur glances-3.2.7.orig/unitest-restful.py glances-3.2.7/unitest-restful.py
|
|
|
|
--- glances-3.2.7.orig/unitest-restful.py 2022-07-28 18:10:35.000000000 +0200
|
|
|
|
+++ glances-3.2.7/unitest-restful.py 2022-07-28 20:22:43.516291302 +0200
|
|
|
|
@@ -12,6 +12,7 @@
|
2020-05-07 13:03:48 +00:00
|
|
|
|
|
|
|
import shlex
|
|
|
|
import subprocess
|
|
|
|
+import sys
|
|
|
|
import time
|
|
|
|
import numbers
|
|
|
|
import unittest
|
2022-07-28 20:38:11 +00:00
|
|
|
@@ -54,7 +55,7 @@
|
2020-05-07 13:03:48 +00:00
|
|
|
global pid
|
|
|
|
|
|
|
|
print('INFO: [TEST_000] Start the Glances Web Server')
|
2022-07-28 20:38:11 +00:00
|
|
|
- cmdline = "python -m glances -B localhost -w -p %s" % SERVER_PORT
|
|
|
|
+ cmdline = "%s -m glances -B localhost -w -p %s" % (sys.executable, 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)
|
|
|
|
pid = subprocess.Popen(args)
|
2022-07-28 20:38:11 +00:00
|
|
|
diff -ur glances-3.2.7.orig/unitest-xmlrpc.py glances-3.2.7/unitest-xmlrpc.py
|
|
|
|
--- glances-3.2.7.orig/unitest-xmlrpc.py 2022-07-28 18:10:35.000000000 +0200
|
|
|
|
+++ glances-3.2.7/unitest-xmlrpc.py 2022-07-28 20:22:49.160260716 +0200
|
|
|
|
@@ -13,6 +13,7 @@
|
2020-05-07 13:03:48 +00:00
|
|
|
import json
|
|
|
|
import shlex
|
|
|
|
import subprocess
|
|
|
|
+import sys
|
|
|
|
import time
|
|
|
|
import unittest
|
|
|
|
|
2022-07-28 20:38:11 +00:00
|
|
|
@@ -43,7 +44,7 @@
|
2020-05-07 13:03:48 +00:00
|
|
|
global pid
|
|
|
|
|
|
|
|
print('INFO: [TEST_000] Start the Glances Web Server')
|
2022-07-28 20:38:11 +00:00
|
|
|
- cmdline = "python -m glances -B localhost -s -p %s" % SERVER_PORT
|
2020-05-07 13:03:48 +00:00
|
|
|
+ cmdline = "%s -m glances -s -p %s" % (sys.executable, SERVER_PORT)
|
|
|
|
print("Run the Glances Server on port %s" % SERVER_PORT)
|
|
|
|
args = shlex.split(cmdline)
|
|
|
|
pid = subprocess.Popen(args)
|