diff options
| author | Yuren Hao <yurenh2@timan108.cs.illinois.edu> | 2025-09-04 22:16:22 -0500 |
|---|---|---|
| committer | Yuren Hao <yurenh2@timan108.cs.illinois.edu> | 2025-09-04 22:16:22 -0500 |
| commit | fc6d57ffb8d5ddb5820fcc00b5491a585c259ebc (patch) | |
| tree | e9841f93a353e2107225cfc721d1ce57c0e594dc /Qwen2.5-Eval/evaluation/latex2sympy/scripts/test.sh | |
Initial commit
Diffstat (limited to 'Qwen2.5-Eval/evaluation/latex2sympy/scripts/test.sh')
| -rwxr-xr-x | Qwen2.5-Eval/evaluation/latex2sympy/scripts/test.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Qwen2.5-Eval/evaluation/latex2sympy/scripts/test.sh b/Qwen2.5-Eval/evaluation/latex2sympy/scripts/test.sh new file mode 100755 index 0000000..20d6b01 --- /dev/null +++ b/Qwen2.5-Eval/evaluation/latex2sympy/scripts/test.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# Get relative path of the root directory of the project +rdir=`git rev-parse --git-dir` +rel_path="$(dirname "$rdir")" +# Change to that path and run the file +cd $rel_path + +# Activate virtual environment +echo "activating venv..." +if test -f .env/bin/activate +then source .env/bin/activate && echo "venv activate (bin)" +elif test -f .env/Scripts/activate +then source .env/Scripts/activate && echo "venv activated (Scripts)" +else exit 1 +fi + +echo '' +echo "compiling parser..." +sh scripts/compile.sh +echo "parser compiled" + +echo '' +# Run unit tests +echo "starting tests..." +if pytest tests +then echo "tests finished" +else exit 1 +fi + +exit 0 |
