Skip to content

Commit 3b5ef9a

Browse files
committed
Add fuzz testing container image
1 parent ca5ed59 commit 3b5ef9a

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

docker/Dockerfile-fuzz

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM fedora:38 AS fuzz
2+
3+
RUN dnf install -y \
4+
python3 \
5+
python3-pip \
6+
&& dnf clean all && rm -rf /var/cache/dnf/*
7+
8+
RUN pip install hypothesis[cli] hypofuzz
9+
10+
COPY fuzz.sh /fuzz.sh
11+
12+
WORKDIR /tmp/work
13+
ENTRYPOINT ["/fuzz.sh"]
14+
15+
EXPOSE 9999/tcp
16+
VOLUME /tmp/work

docker/build-images.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ docker build --tag danielflook/python-minifier-build:python3.10-$DATE -f Dockerf
2626
docker pull fedora:36
2727
docker build --tag danielflook/python-minifier-build:python3.11-$DATE -f Dockerfile-fedora36 --target python3.11 .
2828

29+
docker pull fedora:38
30+
docker build --tag danielflook/python-minifier-build:fuzz-$DATE -f Dockerfile-fuzz --target fuzz .
31+
2932
docker push danielflook/python-minifier-build:python3.3-$DATE
3033
docker push danielflook/python-minifier-build:python2.7-$DATE
3134
docker push danielflook/python-minifier-build:python3.4-$DATE
@@ -38,3 +41,4 @@ docker push danielflook/python-minifier-build:python3.10-$DATE
3841
docker push danielflook/python-minifier-build:python3.11-$DATE
3942
docker push danielflook/python-minifier-build:pypy-$DATE
4043
docker push danielflook/python-minifier-build:pypy3-$DATE
44+
docker push danielflook/python-minifier-build:fuzz-$DATE

docker/fuzz.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
pip install .
4+
5+
exec hypothesis fuzz hypo_test

requirements-dev.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ sphinxcontrib-programoutput
66
sphinx_rtd_theme
77
pyyaml
88
sh
9-
hypothesis
9+
hypothesis
10+
hypofuzz

0 commit comments

Comments
 (0)