Download api-contract-validator-cli/tests/test.sh from slfs1991slfs/tb_osworld_test: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/datasets/slfs1991slfs/tb_osworld_test/resolve/main/api-contract-validator-cli/tests/test.sh
- Command line
-
hf download hf://datasets/slfs1991slfs/tb_osworld_test/api-contract-validator-cli/tests/test.sh
-
curl -L -o test.sh https://huggingface.co/datasets/slfs1991slfs/tb_osworld_test/resolve/main/api-contract-validator-cli/tests/test.sh
501 Bytes
| set -e | |
| TEST_DIR="${TEST_DIR:-/tests}" | |
| cd /app | |
| mkdir -p /logs/verifier | |
| if [ "$PWD" = "/" ]; then | |
| echo "Error: No working directory set. Please set a WORKDIR in your Dockerfile before running this script." | |
| exit 1 | |
| fi | |
| # Install pytest at test time | |
| python3 -m pip install --quiet --no-cache-dir pytest==8.4.1 | |
| # Run pytest | |
| python3 -m pytest "$TEST_DIR/test_outputs.py" -rA -v | |
| if [ $? -eq 0 ]; then | |
| echo 1 > /logs/verifier/reward.txt | |
| else | |
| echo 0 > /logs/verifier/reward.txt | |
| fi | |