Skip to content

Commit b1a558d

Browse files
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 <[email protected]>
1 parent 120c8a2 commit b1a558d

File tree

10 files changed

+40
-15
lines changed

10 files changed

+40
-15
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,24 @@ jobs:
306306
uv pip install --isolated pytest-html>=4.1.1 pytest-cov>=6.0.0
307307
working-directory: ${{ matrix.component }}
308308

309+
- name: Run program-model libpng integration test
310+
if: matrix.component == 'program-model' && steps.should_test.outputs.test != 'false'
311+
run: |
312+
uv run --frozen pytest -svv --runintegration tests/c/test_libpng.py \
313+
--junit-xml=integration-test-results.xml \
314+
--html=integration-test-report.html \
315+
--self-contained-html \
316+
--cov=${{ matrix.coverage_module }} \
317+
--cov-report=xml:integration-coverage.xml \
318+
--cov-report=html:integration-htmlcov \
319+
--cov-report=term
320+
env:
321+
PYTHON_WASM_BUILD_PATH: "python-3.12.0.wasm"
322+
working-directory: ${{ matrix.component }}
323+
timeout-minutes: 30
324+
309325
- name: Run integration tests on ${{ matrix.component }}
310-
if: steps.should_test.outputs.test != 'false'
326+
if: matrix.component != 'program-model' && steps.should_test.outputs.test != 'false'
311327
run: |
312328
uv run --frozen pytest -svv --runintegration \
313329
--junit-xml=integration-test-results.xml \

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "external/aixcc-cscope"]
2-
path = external/aixcc-cscope
3-
url = https://github.com/trailofbits/aixcc-cscope.git
1+
[submodule "external/buttercup-cscope"]
2+
path = external/buttercup-cscope
3+
url = https://github.com/trail-of-forks/buttercup-cscope

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ validate:
5151
# Deployment targets
5252
deploy:
5353
@echo "Deploying to current environment..."
54-
@if [ ! -f external/aixcc-cscope/configure.ac ]; then \
54+
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \
5555
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
5656
exit 1; \
5757
fi
@@ -102,7 +102,7 @@ deploy-local:
102102
echo "Error: Configuration file not found. Run 'make setup-local' first."; \
103103
exit 1; \
104104
fi
105-
@if [ ! -f external/aixcc-cscope/configure.ac ]; then \
105+
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \
106106
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
107107
exit 1; \
108108
fi
@@ -116,7 +116,7 @@ deploy-azure:
116116
echo "Error: Configuration file not found. Run 'make setup-azure' first."; \
117117
exit 1; \
118118
fi
119-
@if [ ! -f external/aixcc-cscope/configure.ac ]; then \
119+
@if [ ! -f external/buttercup-cscope/configure.ac ]; then \
120120
echo "Error: The git submodules have not been initialized. Run 'git submodule update --init --recursive' first."; \
121121
exit 1; \
122122
fi
@@ -212,7 +212,7 @@ clean-local:
212212

213213
# Additional targets migrated from justfile
214214
install-cscope:
215-
cd external/aixcc-cscope/ && autoreconf -i -s && ./configure && make && sudo make install
215+
cd external/buttercup-cscope/ && autoreconf -i -s && ./configure && make && sudo make install
216216

217217
signoz-ui:
218218
@echo "Opening SigNoz UI..."

external/aixcc-cscope

Lines changed: 0 additions & 1 deletion
This file was deleted.

external/buttercup-cscope

Submodule buttercup-cscope added at 624461a

patcher/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
4949

5050
FROM runtime-base AS cscope-builder
5151
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y autoconf gcc make bison flex libncurses-dev
52-
COPY external/aixcc-cscope /cscope
52+
COPY external/buttercup-cscope /cscope
5353
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
5454

5555
FROM runtime-base AS runtime

program-model/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
3333

3434
FROM base AS cscope-builder
3535
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y autoconf gcc make bison flex libncurses-dev
36-
COPY external/aixcc-cscope /cscope
36+
COPY external/buttercup-cscope /cscope
3737
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
3838

3939
FROM base AS runtime

program-model/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ test:
3434
# PYTEST_DEBUG_TEMPROOT="/crs_scratch/" uv run pytest -svv --runintegration
3535

3636
# To run tests
37-
uv run pytest -svv --runintegration
37+
uv run pytest -svv --runintegration tests/c/test_libpng.py

program-model/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22

33
Indexes a program's source code to be queried by `seed-gen` and `patcher`.
44

5-
## Setup
5+
## Dependencies
66

7+
* [CodeQuery](https://ruben2020.github.io/codequery/)
8+
* <https://github.com/trail-of-forks/buttercup-cscope>
9+
* [Tree-sitter](https://tree-sitter.github.io/tree-sitter/)
10+
11+
## Quick Test
12+
13+
```shell
14+
uv run pytest -svv
15+
```
716

817
## Development
918

10-
Sync, reformat, lint, and test before committing changes to this directory.
19+
Before committing changes to this directory: reformat, lint, and ensure all tests pass.
1120

1221
```shell
1322
make all

seed-gen/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
4343

4444
FROM runtime-base AS cscope-builder
4545
RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf gcc make bison flex libncurses-dev
46-
COPY external/aixcc-cscope /cscope
46+
COPY external/buttercup-cscope /cscope
4747
RUN cd /cscope && autoreconf -i -s && ./configure && make && make install
4848

4949
FROM runtime-base AS runtime

0 commit comments

Comments
 (0)