Skip to content

Commit 4594232

Browse files
author
andy
committed
add high-voltage-test
1 parent 77c224a commit 4594232

File tree

16 files changed

+818
-5
lines changed

16 files changed

+818
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
__pycache__
66
build
77
testing_data/*
8+
node_modules
89

production_scripts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from gravimetric_testing.openwebapp import openweb
1515
from tools.reading_laser import ReadLaser
1616
from server.start_server import start_server
17+
from tools.high_voltage_test.main import run_high_voltage_test
1718

1819
addpathpat = os.path.dirname(__file__)
1920
addpath = os.path.dirname(os.path.dirname(__file__))
@@ -59,6 +60,8 @@
5960
asyncio.run(reader.run_test("RIGHT-D1", project_path))
6061
elif '9' in test_name:
6162
start_server()
63+
elif '10' in test_name:
64+
run_high_voltage_test()
6265
else:
6366
pass
6467

server/start_server.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from fastapi import FastAPI, APIRouter, status
33
from server.engine.router import engine_router
44
from server.testing.router import testing_router
5+
import os
6+
import subprocess
57

68
api_router = APIRouter()
79

@@ -27,6 +29,19 @@ async def get_system_info():
2729

2830

2931
def start_server():
32+
# back end
3033
uvicorn.run(app, host="127.0.0.1", port=8888)
34+
# fore end
35+
36+
# cmd = f'pyinstaller -F --ico="assets/logo.ico" --name=Productions-{VERSION} production_scripts.py'
37+
# process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
38+
# while True:
39+
# line = process.stdout.readline()
40+
# if not line:
41+
# break # 如果没有读取到数据,表示子进程已经结束,退出循环
42+
# else:
43+
# print(line, end='') # 实时打印输出
44+
# process.wait()
45+
3146

3247

0 commit comments

Comments
 (0)