feat(board): run shared session programs - #160
Closed
ZR233 wants to merge 1 commit into
Closed
Conversation
Member
Author
|
方案调整:tgoskits 将复用现有 session 文件上传与 shell_init_cmd,不再需要 client 侧自动执行程序,因此关闭此 PR。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
已有 session HTTP 共享要求每个板卡用例重复编写下载、重试、赋权和执行脚本。对于只需运行一个测试程序的用例,这种配置冗长,也容易让本地路径、上传路径和板端路径失配。
改动
BoardSessionProgram,在BoardRunConfig中声明程序相对路径和 argv。BoardRunRequest::with_session_root,统一收集session_files与session_program.path,保持原相对路径且不支持 alias 或改名。..、重复路径、符号链接逃逸检查。with_session_files与手写shell_init_cmd用法;session_program与shell_init_cmd明确互斥。设计逻辑
协议和服务端保持不变:程序仍是现有 session 共享文件,只在 client 侧把 typed 配置转换为既有上传和 shell-init 行为。因此 ostool-server 0.5.0 可继续运行,无需升级。路径从本地 session root 到 HTTP URL 和板端目录始终一致,避免额外的远端名称映射。
验证
cargo fmt --allcargo test -p ostool -p ostool-server --no-fail-fastcargo clippy -p ostool -p ostool-server --all-targets -- -D warnings非目标
shell_init_cmd。