aboutsummaryrefslogtreecommitdiffstats
path: root/test/server_poll.py
diff options
context:
space:
mode:
authorVladimir Repin <32306715+mezotaken@users.noreply.github.com>2022-11-14 10:39:22 +0000
committerVladimir Repin <32306715+mezotaken@users.noreply.github.com>2022-11-14 10:39:22 +0000
commit93d6c0209ae55632b72751cf82740e32a0cd81bc (patch)
tree5624ebfb70e823b0a1be1f496ecdba75fb02c92a /test/server_poll.py
parent007f4f7314eabd9cc3a2b0d11889de49ad3c682a (diff)
downloadstable-diffusion-webui-gfx803-93d6c0209ae55632b72751cf82740e32a0cd81bc.tar.gz
stable-diffusion-webui-gfx803-93d6c0209ae55632b72751cf82740e32a0cd81bc.tar.bz2
stable-diffusion-webui-gfx803-93d6c0209ae55632b72751cf82740e32a0cd81bc.zip
Tests separated for github-actions CI
Diffstat (limited to 'test/server_poll.py')
-rw-r--r--test/server_poll.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/server_poll.py b/test/server_poll.py
index 8e63b450..c71e906a 100644
--- a/test/server_poll.py
+++ b/test/server_poll.py
@@ -3,7 +3,7 @@ import requests
import time
-def run_tests(proc):
+def run_tests(proc, test_dir):
timeout_threshold = 240
start_time = time.time()
while time.time()-start_time < timeout_threshold:
@@ -14,7 +14,9 @@ def run_tests(proc):
if proc.poll() is not None:
break
if proc.poll() is None:
- suite = unittest.TestLoader().discover('', pattern='*_test.py')
+ if test_dir is None:
+ test_dir = ""
+ suite = unittest.TestLoader().discover(test_dir, pattern="*_test.py", top_level_dir="test")
result = unittest.TextTestRunner(verbosity=2).run(suite)
else:
print("Launch unsuccessful")