Skip to content

Commit

Permalink
Add fuzz testing container image
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Aug 30, 2023
1 parent ca5ed59 commit 3b5ef9a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
16 changes: 16 additions & 0 deletions docker/Dockerfile-fuzz
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM fedora:38 AS fuzz

RUN dnf install -y \
python3 \
python3-pip \
&& dnf clean all && rm -rf /var/cache/dnf/*

RUN pip install hypothesis[cli] hypofuzz

COPY fuzz.sh /fuzz.sh

WORKDIR /tmp/work
ENTRYPOINT ["/fuzz.sh"]

EXPOSE 9999/tcp
VOLUME /tmp/work
4 changes: 4 additions & 0 deletions docker/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ docker build --tag danielflook/python-minifier-build:python3.10-$DATE -f Dockerf
docker pull fedora:36
docker build --tag danielflook/python-minifier-build:python3.11-$DATE -f Dockerfile-fedora36 --target python3.11 .

docker pull fedora:38
docker build --tag danielflook/python-minifier-build:fuzz-$DATE -f Dockerfile-fuzz --target fuzz .

docker push danielflook/python-minifier-build:python3.3-$DATE
docker push danielflook/python-minifier-build:python2.7-$DATE
docker push danielflook/python-minifier-build:python3.4-$DATE
Expand All @@ -38,3 +41,4 @@ docker push danielflook/python-minifier-build:python3.10-$DATE
docker push danielflook/python-minifier-build:python3.11-$DATE
docker push danielflook/python-minifier-build:pypy-$DATE
docker push danielflook/python-minifier-build:pypy3-$DATE
docker push danielflook/python-minifier-build:fuzz-$DATE
5 changes: 5 additions & 0 deletions docker/fuzz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

pip install .

exec hypothesis fuzz hypo_test
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ sphinxcontrib-programoutput
sphinx_rtd_theme
pyyaml
sh
hypothesis
hypothesis
hypofuzz

0 comments on commit 3b5ef9a

Please sign in to comment.