26 lines
586 BLFS
Bash
26 lines
586 BLFS
Bash
#!/bin/bash
|
|
# Install dependencies
|
|
apt-get update > /dev/null 2>&1
|
|
apt-get install -y curl poppler-utils > /dev/null 2>&1
|
|
|
|
# Install uv
|
|
curl -LsSf https://astral.sh/uv/0.9.7/install.sh | sh > /dev/null 2>&1
|
|
source $HOME/.local/bin/env
|
|
|
|
# Ensure logs directory exists
|
|
mkdir -p /logs/verifier
|
|
|
|
# Run pytest
|
|
uvx \
|
|
--with pytest==8.4.1 \
|
|
--with pytest-json-ctrf==0.3.5 \
|
|
pytest --ctrf /logs/verifier/ctrf.json /verifier/test_outputs.py -rA -v
|
|
|
|
PYTEST_EXIT_CODE=$?
|
|
|
|
if [ $PYTEST_EXIT_CODE -eq 0 ]; then
|
|
echo 1 > /logs/verifier/reward.txt
|
|
else
|
|
echo 0 > /logs/verifier/reward.txt
|
|
fi
|