提交 54ee15c8 创建 作者: 305350171@qq.com's avatar 305350171@qq.com

提交作业

上级 d7f7bb1f
流水线 #153578 已失败 于阶段
用时 11 秒
*.exe
*.o
*.bak
result_comparation.html
user_output*.txt
\ No newline at end of file
*.out
*.html
user_output*.txt
{
"files.exclude": {
"**/*.git*": true,
"**/sonar*": true,
"**/valgrind-report.out": true,
"**/requirements.txt": true,
},
"files.associations": {
"stdio.h": "c"
}
}
\ No newline at end of file
......@@ -4,7 +4,12 @@
{
"label": "生成项目(make)",
"type": "shell",
"command": "make",
"windows": {
"command": "cat \"${execPath}.tips\\env_tip.txt\" ; echo VSCode安装路径-${execPath} ; echo 正在生成项目 ; make"
},
"linux": {
"command": "echo 正在生成项目 && make && echo 生成项目成功"
},
"args": [],
"group": "build",
"presentation": {
......@@ -35,11 +40,11 @@
"label": "测试(test)",
"type": "shell",
"windows": {
"command": "python .vscode\\test.py"
"command": "cat \"${execPath}.tips\\python_tip.txt\" ; python .vscode\\test.py"
},
"linux": {
"command": "python3 .vscode/test.py"
},
},
"args": [],
"group": "build",
"presentation": {
......@@ -49,9 +54,14 @@
"problemMatcher": "$gcc"
},
{
"label": "清理项目(clean)",
"label": "清理项目(make clean)",
"type": "shell",
"command": "make clean",
"windows": {
"command": "cat \"${execPath}.tips\\env_tip.txt\" ; echo VSCode安装路径-${execPath} ; echo 正在清理项目 ; make clean"
},
"linux": {
"command": "echo 正在清理项目 && make clean && echo 清理项目成功"
},
"args": [],
"group": "build",
"presentation": {
......@@ -61,37 +71,36 @@
"problemMatcher": "$gcc"
},
{
"label": "运行(run)",
"label": "提交作业(git push)",
"type": "shell",
"windows": {
"command": "make && .\\app.exe"
"command": "cat \"${execPath}.tips\\python_tip.txt\" ; python .vscode\\gitpush.py"
},
"linux": {
"command": "make && ./app.exe"
},
"command": "python3 .vscode/gitpush.py"
},
"args": [],
"group": "build",
"presentation": {
"reveal": "always",
"group": "run",
"focus": true
"group": "git-push"
},
"problemMatcher": "$gcc"
},
{
"label": "提交作业(git push)",
"label": "内存检测",
"type": "shell",
"windows": {
"command": "python .vscode\\gitpush.py"
"command": "cat \"${execPath}.tips\\env_tip.txt\" ; echo VSCode安装路径-${execPath} ; echo 正在使用Dr.Memory检测内存 ; make ; cmd.exe /c \"drmemory -- .\\app.exe '<' input1.txt\""
},
"linux": {
"command": "python3 .vscode/gitpush.py"
"command": "echo 正在使用 Valgrind 检测内存 && make && echo ***如果提示 /bin/bash: valgrind: command not found 可使用终端命令 sudo apt install valgrind 安装(需要连接互联网)*** && valgrind --leak-check=full ./app.exe < input1.txt"
},
"args": [],
"group": "build",
"presentation": {
"reveal": "always",
"group": "git-push"
"group": "test"
},
"problemMatcher": "$gcc"
}
......
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x, y;
int *p = malloc(116);
scanf("%d", &x);
if(x < 1)
......
......@@ -32,4 +32,4 @@ else
endif
clean:
$(RM) *.exe *.o
\ No newline at end of file
$(RM) *.exe *.o result_comparation.html user_output*
\ No newline at end of file
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论