Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
83d6f288
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
大约 1 年 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
83d6f288
编写于
9月 28, 2022
作者:
aaronchen2k2k
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/main'
上级
52a8aed0
35605730
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
25 deletion
+7
-25
internal/pkg/helper/exec/unit.go
internal/pkg/helper/exec/unit.go
+3
-21
ui/src/views/exec/LogList.vue
ui/src/views/exec/LogList.vue
+1
-1
ui/src/views/proxy/ProxyNav.vue
ui/src/views/proxy/ProxyNav.vue
+3
-3
未找到文件。
internal/pkg/helper/exec/unit.go
浏览文件 @
83d6f288
...
@@ -3,7 +3,6 @@ package execHelper
...
@@ -3,7 +3,6 @@ package execHelper
import
(
import
(
"bufio"
"bufio"
"errors"
"errors"
"fmt"
"io"
"io"
"os/exec"
"os/exec"
"path/filepath"
"path/filepath"
...
@@ -11,7 +10,6 @@ import (
...
@@ -11,7 +10,6 @@ import (
"time"
"time"
fileUtils
"github.com/easysoft/zentaoatf/pkg/lib/file"
fileUtils
"github.com/easysoft/zentaoatf/pkg/lib/file"
"github.com/gofrs/uuid"
commConsts
"github.com/easysoft/zentaoatf/internal/pkg/consts"
commConsts
"github.com/easysoft/zentaoatf/internal/pkg/consts"
configHelper
"github.com/easysoft/zentaoatf/internal/pkg/helper/config"
configHelper
"github.com/easysoft/zentaoatf/internal/pkg/helper/config"
...
@@ -93,12 +91,11 @@ func ExecUnit(ch chan int,
...
@@ -93,12 +91,11 @@ func ExecUnit(ch chan int,
func
RunUnitTest
(
ch
chan
int
,
cmdStr
,
workspacePath
string
,
wsMsg
*
websocket
.
Message
)
(
err
error
)
{
func
RunUnitTest
(
ch
chan
int
,
cmdStr
,
workspacePath
string
,
wsMsg
*
websocket
.
Message
)
(
err
error
)
{
key
:=
stringUtils
.
Md5
(
workspacePath
)
key
:=
stringUtils
.
Md5
(
workspacePath
)
uuidString
:=
uuid
.
Must
(
uuid
.
NewV4
())
.
String
()
var
cmd
*
exec
.
Cmd
var
cmd
*
exec
.
Cmd
if
commonUtils
.
IsWin
()
{
if
commonUtils
.
IsWin
()
{
cmd
=
exec
.
Command
(
"cmd"
,
"/C"
,
cmdStr
,
"-uuid"
,
uuidString
)
cmd
=
exec
.
Command
(
"cmd"
,
"/C"
,
cmdStr
)
}
else
{
}
else
{
cmd
=
exec
.
Command
(
"/bin/bash"
,
"-c"
,
fmt
.
Sprintf
(
"%s -uuid %s"
,
cmdStr
,
uuidString
)
)
cmd
=
exec
.
Command
(
"/bin/bash"
,
"-c"
,
cmdStr
)
}
}
cmd
.
Dir
=
workspacePath
cmd
.
Dir
=
workspacePath
...
@@ -138,22 +135,6 @@ func RunUnitTest(ch chan int, cmdStr, workspacePath string, wsMsg *websocket.Mes
...
@@ -138,22 +135,6 @@ func RunUnitTest(ch chan int, cmdStr, workspacePath string, wsMsg *websocket.Mes
}
}
cmd
.
Start
()
cmd
.
Start
()
go
func
()
{
for
{
select
{
case
_
,
ok
:=
<-
ch
:
KillProcessByUUID
(
uuidString
)
stdout
.
Close
()
stderr
.
Close
()
SetRunning
(
false
)
if
ok
{
close
(
ch
)
}
return
default
:
}
}
}()
isTerminal
:=
false
isTerminal
:=
false
reader1
:=
bufio
.
NewReader
(
stdout
)
reader1
:=
bufio
.
NewReader
(
stdout
)
...
@@ -175,6 +156,7 @@ func RunUnitTest(ch chan int, cmdStr, workspacePath string, wsMsg *websocket.Mes
...
@@ -175,6 +156,7 @@ func RunUnitTest(ch chan int, cmdStr, workspacePath string, wsMsg *websocket.Mes
select
{
select
{
case
<-
ch
:
case
<-
ch
:
cmd
.
Process
.
Kill
()
msg
:=
i118Utils
.
Sprintf
(
"exit_exec_curr"
)
msg
:=
i118Utils
.
Sprintf
(
"exit_exec_curr"
)
if
commConsts
.
ExecFrom
!=
commConsts
.
FromCmd
{
if
commConsts
.
ExecFrom
!=
commConsts
.
FromCmd
{
...
...
ui/src/views/exec/LogList.vue
浏览文件 @
83d6f288
...
@@ -296,7 +296,7 @@ const exec = async (data: any) => {
...
@@ -296,7 +296,7 @@ const exec = async (data: any) => {
const
checkProxyStatus
=
async
(
workspaceId
,
msg
)
=>
{
const
checkProxyStatus
=
async
(
workspaceId
,
msg
)
=>
{
if
(
msg
.
testSets
==
undefined
){
if
(
msg
.
testSets
==
undefined
){
return
{
path
:
''
};
return
{
path
:
'
local
'
};
}
}
currentWorkspace
.
value
=
{};
currentWorkspace
.
value
=
{};
let
workspaceInfo
=
{}
as
any
;
let
workspaceInfo
=
{}
as
any
;
...
...
ui/src/views/proxy/ProxyNav.vue
浏览文件 @
83d6f288
<
template
>
<
template
>
<
View
class=
"space-left"
>
<
div
class=
"space-left"
>
<
View
class=
"title space"
>
{{
t
(
'
remote_proxy
'
)
}}
:
</View
>
<
div
class=
"title space"
>
{{
t
(
'
remote_proxy
'
)
}}
:
</div
>
<Button
id=
"proxyMenuToggle"
<Button
id=
"proxyMenuToggle"
:label=
"currProxy.id == 0 || currProxy.id == undefined ? t('local_proxy') : currProxy.name"
:label=
"currProxy.id == 0 || currProxy.id == undefined ? t('local_proxy') : currProxy.name"
class=
"rounded border lighten-16"
class=
"rounded border lighten-16"
suffix-icon=
"caret-down"
/>
suffix-icon=
"caret-down"
/>
</
View
>
</
div
>
<DropdownMenu
<DropdownMenu
v-if=
"proxies.length>0"
v-if=
"proxies.length>0"
toggle=
"#proxyMenuToggle"
toggle=
"#proxyMenuToggle"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录