mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
Update location and name of cscope (#246)
* Update location and name of cscope * Update README and add quick test script * Add architecture check and disable full test for now * Remove test script. Enable libpng integration test --------- Co-authored-by: Michael D Brown <michael.brown@trailofbits.com>
This commit is contained in:
@@ -306,8 +306,24 @@ jobs:
|
|||||||
uv pip install --isolated pytest-html>=4.1.1 pytest-cov>=6.0.0
|
uv pip install --isolated pytest-html>=4.1.1 pytest-cov>=6.0.0
|
||||||
working-directory: ${{ matrix.component }}
|
working-directory: ${{ matrix.component }}
|
||||||
|
|
||||||
|
- name: Run program-model libpng integration test
|
||||||
|
if: matrix.component == 'program-model' && steps.should_test.outputs.test != 'false'
|
||||||
|
run: |
|
||||||
|
uv run --frozen pytest -svv --runintegration tests/c/test_libpng.py \
|
||||||
|
--junit-xml=integration-test-results.xml \
|
||||||
|
--html=integration-test-report.html \
|
||||||
|
--self-contained-html \
|
||||||
|
--cov=${{ matrix.coverage_module }} \
|
||||||
|
--cov-report=xml:integration-coverage.xml \
|
||||||
|
--cov-report=html:integration-htmlcov \
|
||||||
|
--cov-report=term
|
||||||
|
env:
|
||||||
|
PYTHON_WASM_BUILD_PATH: "python-3.12.0.wasm"
|
||||||
|
working-directory: ${{ matrix.component }}
|
||||||
|
timeout-minutes: 30
|
||||||
|
|
||||||
- name: Run integration tests on ${{ matrix.component }}
|
- name: Run integration tests on ${{ matrix.component }}
|
||||||
if: steps.should_test.outputs.test != 'false'
|
if: matrix.component != 'program-model' && steps.should_test.outputs.test != 'false'
|
||||||
run: |
|
run: |
|
||||||
uv run --frozen pytest -svv --runintegration \
|
uv run --frozen pytest -svv --runintegration \
|
||||||
--junit-xml=integration-test-results.xml \
|
--junit-xml=integration-test-results.xml \
|
||||||
|
|||||||
+3
-3
@@ -1,3 +1,3 @@
|
|||||||
[submodule "external/aixcc-cscope"]
|
[submodule "external/buttercup-cscope"]
|
||||||
path = external/aixcc-cscope
|
path = external/buttercup-cscope
|
||||||
url = https://github.com/trailofbits/aixcc-cscope.git
|
url = https://github.com/trail-of-forks/buttercup-cscope
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ validate:
|
|||||||
# Deployment targets
|
# Deployment targets
|
||||||
deploy:
|
deploy:
|
||||||
@echo "Deploying to current environment..."
|
@echo "Deploying to current environment..."
|
||||||
@if [ ! -f external/aixcc-cscope/configure.ac ]; then \
|
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \
|
||||||
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
|
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
@@ -102,7 +102,7 @@ deploy-local:
|
|||||||
echo "Error: Configuration file not found. Run 'make setup-local' first."; \
|
echo "Error: Configuration file not found. Run 'make setup-local' first."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
@if [ ! -f external/aixcc-cscope/configure.ac ]; then \
|
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \
|
||||||
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
|
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
@@ -116,7 +116,7 @@ deploy-azure:
|
|||||||
echo "Error: Configuration file not found. Run 'make setup-azure' first."; \
|
echo "Error: Configuration file not found. Run 'make setup-azure' first."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
@if [ ! -f external/aixcc-cscope/configure.ac ]; then \
|
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \
|
||||||
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
|
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
@@ -212,7 +212,7 @@ clean-local:
|
|||||||
|
|
||||||
# Additional targets migrated from justfile
|
# Additional targets migrated from justfile
|
||||||
install-cscope:
|
install-cscope:
|
||||||
cd external/aixcc-cscope/ && autoreconf -i -s && ./configure && make && sudo make install
|
cd external/buttercup-cscope/ && autoreconf -i -s && ./configure && make && sudo make install
|
||||||
|
|
||||||
signoz-ui:
|
signoz-ui:
|
||||||
@echo "Opening SigNoz UI..."
|
@echo "Opening SigNoz UI..."
|
||||||
|
|||||||
Vendored
-1
Submodule external/aixcc-cscope deleted from d814aabe85
+1
Submodule external/buttercup-cscope added at 624461a727
+1
-1
@@ -49,7 +49,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||||||
|
|
||||||
FROM runtime-base AS cscope-builder
|
FROM runtime-base AS cscope-builder
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y autoconf gcc make bison flex libncurses-dev
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y autoconf gcc make bison flex libncurses-dev
|
||||||
COPY external/aixcc-cscope /cscope
|
COPY external/buttercup-cscope /cscope
|
||||||
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
|
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
|
||||||
|
|
||||||
FROM runtime-base AS runtime
|
FROM runtime-base AS runtime
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||||||
|
|
||||||
FROM base AS cscope-builder
|
FROM base AS cscope-builder
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y autoconf gcc make bison flex libncurses-dev
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y autoconf gcc make bison flex libncurses-dev
|
||||||
COPY external/aixcc-cscope /cscope
|
COPY external/buttercup-cscope /cscope
|
||||||
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
|
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
|
||||||
|
|
||||||
FROM base AS runtime
|
FROM base AS runtime
|
||||||
|
|||||||
@@ -34,4 +34,4 @@ test:
|
|||||||
# PYTEST_DEBUG_TEMPROOT="/crs_scratch/" uv run pytest -svv --runintegration
|
# PYTEST_DEBUG_TEMPROOT="/crs_scratch/" uv run pytest -svv --runintegration
|
||||||
|
|
||||||
# To run tests
|
# To run tests
|
||||||
uv run pytest -svv --runintegration
|
uv run pytest -svv --runintegration tests/c/test_libpng.py
|
||||||
|
|||||||
+11
-2
@@ -2,12 +2,21 @@
|
|||||||
|
|
||||||
Indexes a program's source code to be queried by `seed-gen` and `patcher`.
|
Indexes a program's source code to be queried by `seed-gen` and `patcher`.
|
||||||
|
|
||||||
## Setup
|
## Dependencies
|
||||||
|
|
||||||
|
* [CodeQuery](https://ruben2020.github.io/codequery/)
|
||||||
|
* <https://github.com/trail-of-forks/buttercup-cscope>
|
||||||
|
* [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)
|
||||||
|
|
||||||
|
## Quick Test
|
||||||
|
|
||||||
|
```shell
|
||||||
|
uv run pytest -svv
|
||||||
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Sync, reformat, lint, and test before committing changes to this directory.
|
Before committing changes to this directory: reformat, lint, and ensure all tests pass.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
make all
|
make all
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||||||
|
|
||||||
FROM runtime-base AS cscope-builder
|
FROM runtime-base AS cscope-builder
|
||||||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf gcc make bison flex libncurses-dev
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf gcc make bison flex libncurses-dev
|
||||||
COPY external/aixcc-cscope /cscope
|
COPY external/buttercup-cscope /cscope
|
||||||
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
|
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
|
||||||
|
|
||||||
FROM runtime-base AS runtime
|
FROM runtime-base AS runtime
|
||||||
|
|||||||
Reference in New Issue
Block a user