Download environment/tasks/fix-code-vulnerability/tests/test.sh from benchflow/openenv-smoke-fix-git: direct link, hf CLI and curl.
- Browser
- Download file 653 Bytes
-
https://huggingface.co/datasets/benchflow/openenv-smoke-fix-git/resolve/main/environment/tasks/fix-code-vulnerability/tests/test.sh
- Command line
-
hf download hf://datasets/benchflow/openenv-smoke-fix-git/environment/tasks/fix-code-vulnerability/tests/test.sh
-
curl -L -o test.sh https://huggingface.co/datasets/benchflow/openenv-smoke-fix-git/resolve/main/environment/tasks/fix-code-vulnerability/tests/test.sh
653 Bytes
| # Check if we're in a valid working directory | |
| if [ "$PWD" = "/" ]; then | |
| echo "Error: No working directory set. Please set a WORKDIR in your Dockerfile before running this script." | |
| exit 1 | |
| fi | |
| pip install pytest==8.4.1 pytest-json-ctrf==0.3.5 | |
| # test from original repo | |
| python -m pytest --ctrf /logs/verifier/original-repo-ctrf.json -rA | |
| ORIGINAL_EXIT_CODE=$? | |
| # additional test | |
| python -m pytest --ctrf /logs/verifier/ctrf.json /tests/test_outputs.py -rA | |
| ADDITIONAL_EXIT_CODE=$? | |
| if [ $ORIGINAL_EXIT_CODE -eq 0 ] && [ $ADDITIONAL_EXIT_CODE -eq 0 ]; then | |
| echo 1 > /logs/verifier/reward.txt | |
| else | |
| echo 0 > /logs/verifier/reward.txt | |
| fi | |