Files
trailofbits-buttercup/program-model/justfile
T
Evan Downing a754c94c82 Add new regression tests for c/java (#378)
* Add zookeeper test file

* Update java function query.

* Add caller/callee queries

* Add example test for C with fixture

* Refactor challenge task creation in tests

---------

Co-authored-by: Boyan MILANOV <boyanmilanov@coder-boyanmilanov-aixcc-boyan.c.production-1-405717.internal>
2025-04-10 10:09:35 +03:00

36 lines
1.3 KiB
Makefile

all: && sync reformat lint test
sync:
uv sync --all-extras
reformat:
uv run ruff format
uv run ruff check --fix
lint:
uv run ruff format --check
uv run ruff check
# uv run mypy
test:
uv run pytest -svv --log-cli-level=DEBUG --runintegration
install-gh:
(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \
&& sudo mkdir -p -m 755 /etc/apt/keyrings \
&& out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \
&& cat $out | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
download-kythe:
mkdir -p scripts/gzs/kythe
docker pull ghcr.io/aixcc-finals/buttercup-kythe:main
docker create --name temp-kythe ghcr.io/aixcc-finals/buttercup-kythe:main
docker cp temp-kythe:/kythe-v0.0.67.tar.gz scripts/gzs/
docker rm temp-kythe
tar xvzf scripts/gzs/kythe-v0.0.67.tar.gz -C scripts/gzs/kythe/ --strip-components=1
rm scripts/gzs/kythe-v0.0.67.tar.gz