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

提交作业

上级 d7f7bb1f
流水线 #153578 已失败 于阶段
用时 11 秒
*.exe *.exe
*.o *.o
*.bak *.bak
result_comparation.html *.out
user_output*.txt *.html
\ No newline at end of file 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 @@ ...@@ -4,7 +4,12 @@
{ {
"label": "生成项目(make)", "label": "生成项目(make)",
"type": "shell", "type": "shell",
"command": "make", "windows": {
"command": "cat \"${execPath}.tips\\env_tip.txt\" ; echo VSCode安装路径-${execPath} ; echo 正在生成项目 ; make"
},
"linux": {
"command": "echo 正在生成项目 && make && echo 生成项目成功"
},
"args": [], "args": [],
"group": "build", "group": "build",
"presentation": { "presentation": {
...@@ -35,11 +40,11 @@ ...@@ -35,11 +40,11 @@
"label": "测试(test)", "label": "测试(test)",
"type": "shell", "type": "shell",
"windows": { "windows": {
"command": "python .vscode\\test.py" "command": "cat \"${execPath}.tips\\python_tip.txt\" ; python .vscode\\test.py"
}, },
"linux": { "linux": {
"command": "python3 .vscode/test.py" "command": "python3 .vscode/test.py"
}, },
"args": [], "args": [],
"group": "build", "group": "build",
"presentation": { "presentation": {
...@@ -49,9 +54,14 @@ ...@@ -49,9 +54,14 @@
"problemMatcher": "$gcc" "problemMatcher": "$gcc"
}, },
{ {
"label": "清理项目(clean)", "label": "清理项目(make clean)",
"type": "shell", "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": [], "args": [],
"group": "build", "group": "build",
"presentation": { "presentation": {
...@@ -61,37 +71,36 @@ ...@@ -61,37 +71,36 @@
"problemMatcher": "$gcc" "problemMatcher": "$gcc"
}, },
{ {
"label": "运行(run)", "label": "提交作业(git push)",
"type": "shell", "type": "shell",
"windows": { "windows": {
"command": "make && .\\app.exe" "command": "cat \"${execPath}.tips\\python_tip.txt\" ; python .vscode\\gitpush.py"
}, },
"linux": { "linux": {
"command": "make && ./app.exe" "command": "python3 .vscode/gitpush.py"
}, },
"args": [], "args": [],
"group": "build", "group": "build",
"presentation": { "presentation": {
"reveal": "always", "reveal": "always",
"group": "run", "group": "git-push"
"focus": true
}, },
"problemMatcher": "$gcc" "problemMatcher": "$gcc"
}, },
{ {
"label": "提交作业(git push)", "label": "内存检测",
"type": "shell", "type": "shell",
"windows": { "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": { "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": [], "args": [],
"group": "build", "group": "build",
"presentation": { "presentation": {
"reveal": "always", "reveal": "always",
"group": "git-push" "group": "test"
}, },
"problemMatcher": "$gcc" "problemMatcher": "$gcc"
} }
......
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
int main() int main()
{ {
int x, y; int x, y;
int *p = malloc(116);
scanf("%d", &x); scanf("%d", &x);
if(x < 1) if(x < 1)
......
...@@ -32,4 +32,4 @@ else ...@@ -32,4 +32,4 @@ else
endif endif
clean: clean:
$(RM) *.exe *.o $(RM) *.exe *.o result_comparation.html user_output*
\ No newline at end of file \ No newline at end of file
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论