Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
test-vscode-c-win
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸大学计算机学院
教师群组
赵鹏翀-zpc
test-vscode-c-win
提交
de02e678
提交
de02e678
3月 17, 2021
创建
作者:
宋海霞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
已更改
上级
cf7921c3
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
14 行增加
和
12 行删除
+14
-12
.gitlab-ci.yml
.gitlab-ci.yml
+1
-0
local_test.py
local_test.py
+13
-12
没有找到文件。
.gitlab-ci.yml
浏览文件 @
de02e678
...
...
@@ -52,6 +52,7 @@ teacher-check1:
-
count=$(find . -name "input*.txt" | wc -l)
-
git clone ${CODECODE_PROTOCOL}gitlab-ci-token:${CI_JOB_TOKEN}@${CODECODE_DOMAIN}/${CI_PROJECT_FORKSOURCE} template
-
diff template/.gitlab-ci.yml .gitlab-ci.yml -b -B -y -i --suppress-common-lines
-
diff template/local_test.py local_test.py -b -B -y -i --suppress-common-lines
-
for i in $(seq 1 1 $count);
do
./app.exe < input${i}.txt > /dev/null;
...
...
local_test.py
浏览文件 @
de02e678
...
...
@@ -139,6 +139,11 @@ def outputPromptInfo(bIncludeCi, promptInfo, color):
print
(
Fore
.
WHITE
,
file
=
stream
)
sys
.
stdout
.
flush
()
def
removeResultFile
(
args
):
for
filename
in
args
:
if
os
.
path
.
isfile
(
filename
):
os
.
remove
(
filename
)
if
__name__
==
"__main__"
:
bIncludeCi
=
False
...
...
@@ -159,18 +164,14 @@ if __name__ == "__main__":
exit
(
1
)
print
()
compResultFile
=
"result_comparation.html"
if
os
.
path
.
isfile
(
compResultFile
):
os
.
remove
(
compResultFile
)
execFile
=
"app.exe"
if
os
.
path
.
isfile
(
execFile
):
os
.
remove
(
execFile
)
execFile
=
"*.o"
if
os
.
path
.
isfile
(
execFile
):
os
.
remove
(
execFile
)
# 清理项目
removefiles
=
[]
files
=
os
.
listdir
(
"."
)
for
f
in
files
:
if
f
.
endswith
(
'.o'
)
or
f
.
endswith
(
'.exe'
)
or
f
.
startswith
(
'user_output'
)
or
f
==
"result_comparation.html"
:
removefiles
.
append
(
f
)
removeResultFile
(
removefiles
)
promptInfo
=
"正在使用make生成项目"
outputPromptInfo
(
bIncludeCi
,
promptInfo
,
1
)
...
...
@@ -243,7 +244,7 @@ if __name__ == "__main__":
errorInfo
=
"输出结果比较异常,返回值:{0}。"
.
format
(
execResult
)
outputPromptInfo
(
bIncludeCi
,
errorInfo
,
2
)
else
:
promptInfo
=
"提示:
\n
请使用以下方式打开文件的比较结果:
\n
选择View菜单中的Explorer菜单项,在打开的文件列表中,右击result_comparation.html文件,
\n
在弹出的菜单中选择
\
“Open Preview
\
”菜单项,可以打开比较结果输出文件,可帮助用户查找验证失败的原因。"
promptInfo
=
"提示:
\n
请使用以下方式打开文件的比较结果:
\n
选择View菜单中的Explorer菜单项,在打开的文件列表中,右击result_comparation.html文件,
\n
在弹出的菜单中选择
“Open Preview
”菜单项,可以打开比较结果输出文件,可帮助用户查找验证失败的原因。"
outputPromptInfo
(
bIncludeCi
,
promptInfo
,
2
)
exit
(
1
)
seqNum
=
seqNum
+
1
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论