Skip to content

Commit

Permalink
Merge branch 'SJTU-IPADS:main' into fix-env
Browse files Browse the repository at this point in the history
  • Loading branch information
anexpn authored Oct 29, 2024
2 parents 3bf47be + e3096f9 commit bca71e1
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Lab1/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
},
],
"MIMode": "gdb",
// "miDebuggerPath": "/path/to/your gdb",
"targetArchitecture": "arm64",
"miDebuggerServerAddress": "localhost:1234",
"miDebuggerPath": "/usr/local/bin/gdb",
"preLaunchTask": "Setup QEMU"
}
]
}
}
4 changes: 2 additions & 2 deletions Lab2/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
},
],
"MIMode": "gdb",
// "miDebuggerPath": "/path/to/your gdb",
"targetArchitecture": "arm64",
"miDebuggerServerAddress": "localhost:1234",
"miDebuggerPath": "/usr/local/bin/gdb",
"preLaunchTask": "Setup QEMU"
}
]
}
}
4 changes: 2 additions & 2 deletions Lab3/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
},
],
"MIMode": "gdb",
// "miDebuggerPath": "/path/to/your gdb",
"targetArchitecture": "arm64",
"miDebuggerServerAddress": "localhost:1234",
"miDebuggerPath": "/usr/local/bin/gdb",
"preLaunchTask": "Setup QEMU"
}
]
}
}
4 changes: 2 additions & 2 deletions Lab4/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
},
],
"MIMode": "gdb",
// "miDebuggerPath": "/path/to/your gdb",
"targetArchitecture": "arm64",
"miDebuggerServerAddress": "localhost:1234",
"miDebuggerPath": "/usr/local/bin/gdb",
"preLaunchTask": "Setup QEMU"
}
]
}
}
4 changes: 2 additions & 2 deletions Lab5/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
},
],
"MIMode": "gdb",
// "miDebuggerPath": "/path/to/your gdb",
"targetArchitecture": "arm64",
"miDebuggerServerAddress": "localhost:1234",
"miDebuggerPath": "/usr/local/bin/gdb",
"preLaunchTask": "Setup QEMU"
}
]
}
}
4 changes: 2 additions & 2 deletions Pages/Getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
### 使用Dev-Container (推荐)
如果你使用的是带有支持Microsoft规范下Dev-Container插件的代码编辑器或者集成开发环境,亦或者你使用的是非Linux平台的开发环境,我们强烈建议你使用Dev-container直接进行开发,我们已经在其中已经预先安装好了你可能需要使用的所有工具链。并且针对vscode我们在每个Lab的分支目录下都已经配置好了合适的插件配置,简单安装即可以一键启用。
如果你使用的是带有支持Microsoft规范下[Dev-Container](https://vscode.github.net.cn/docs/devcontainers/tutorial)插件的代码编辑器或者集成开发环境,亦或者你使用的是非Linux平台的开发环境,我们**强烈建议**你使用Dev-container直接进行开发,我们已经在其中已经预先安装好了你可能需要使用的所有工具链。并且针对vscode我们在每个Lab的分支目录下都已经配置好了合适的插件配置,简单安装即可以一键启用。安装完之后进入本实验的**根目录**,此时dev-container会识别到容器开发环境,重新进入后就可以直接使用了
### 本地手动安装(推荐)
### 本地手动安装
如果你并不想要使用Dev-container,且你使用的是原生Linux平台或者自行创建的Linux虚拟机,我们在下方准备了所有流行发行版的工具链安装命令。同时我们也推荐安装`clangd`,其可以根据`CMake`生成的`compile_commands.json`即编译信息数据库提供增强的LSP的提示功能,用于支撑区分相同函数签名但是不同编译单元参与编译的重名跳转以及根据宏定义用于高显源文件。
Expand Down
2 changes: 1 addition & 1 deletion Scripts/capturer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
print(
"This script requires Python version 3.7 and later. Please upgrade your Python version to grade this lab."
)
sys.exit(0)
sys.exit(255)

try:
import psutil
Expand Down
16 changes: 16 additions & 0 deletions Scripts/extras/lab5/grader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,37 @@ cp "${CMAKE_EXTRA_DIR}/cmake-fsm-full.txt" "${FSM_DIR}/CMakeLists.txt"
cp "${CMAKE_EXTRA_DIR}/cmake-fs_base-part1.txt" "${FS_BASE_DIR}/CMakeLists.txt"
${SCRIPTS}/capturer.py -f ${LABDIR}/scores-part1.json -t 30 make qemu-grade 2> /dev/null
score=$(($score+$?))
if [[ $score -eq 255 ]]; then
error "Something went wrong. Please check the output of your program"
exit 0
fi
# Part2 VNode
cp "${CMAKE_EXTRA_DIR}/cmake-fsm-part2.txt" "${FSM_DIR}/CMakeLists.txt"
cp "${CMAKE_EXTRA_DIR}/cmake-fs_base-part2-vnode.txt" "${FS_BASE_DIR}/CMakeLists.txt"
${SCRIPTS}/capturer.py -f ${LABDIR}/scores-part2.json -t 30 make qemu-grade 2> /dev/null
score=$(($score+$?))
if [[ $score -eq 255 ]]; then
error "Something went wrong. Please check the output of your program"
exit 0
fi
# Part3 Server Entry
cp "${CMAKE_EXTRA_DIR}/cmake-fsm-part2.txt" "${FSM_DIR}/CMakeLists.txt"
cp "${CMAKE_EXTRA_DIR}/cmake-fs_base-part2-server_entry.txt" "${FS_BASE_DIR}/CMakeLists.txt"
${SCRIPTS}/capturer.py -f ${LABDIR}/scores-part3.json -t 30 make qemu-grade 2> /dev/null
score=$(($score+$?))
if [[ $score -eq 255 ]]; then
error "Something went wrong. Please check the output of your program"
exit 0
fi
# Part4 Ops
mv "${FSM_DIR}/CMakeLists.txt.bak" "${FSM_DIR}/CMakeLists.txt"
mv "${FS_BASE_DIR}/CMakeLists.txt.bak" "${FS_BASE_DIR}/CMakeLists.txt"
${SCRIPTS}/capturer.py -f ${LABDIR}/scores-part4.json -t 30 make qemu-grade 2> /dev/null
score=$(($score+$?))
if [[ $score -eq 255 ]]; then
error "Something went wrong. Please check the output of your program"
exit 0
fi

info "Score: $score/100"
bold "==========================================="
Expand Down
6 changes: 6 additions & 0 deletions Scripts/grader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ info "Grading lab ${LAB} ...(may take ${TIMEOUT} seconds)"
bold "==========================================="
${LABROOT}/Scripts/capturer.py $@ 2> /dev/null
score=$?

if [[ $score -eq 255 ]]; then
error "Something went wrong. Please check the output of your program"
exit 0
fi

info "Score: $score/100"
bold "==========================================="

Expand Down

0 comments on commit bca71e1

Please sign in to comment.