Commit 8c5d8371 authored by Julian Brinkmann's avatar Julian Brinkmann Committed by Luca Büning
Browse files

fuzzing stage

parent 98124503
Pipeline #97349 failed with stages
in 7 minutes and 57 seconds
......@@ -2,6 +2,8 @@ image: nixos/nix:latest
stages:
- build
- test
build:
stage: build
......@@ -9,4 +11,13 @@ build:
- nix-build release.nix -A rpn-calculator
artifacts:
paths:
- result
\ No newline at end of file
- result
fuzz:run:
stage: test
script:
- nix-build release.nix -A rpn-calculator-fuzz
artifacts:
expire_in: 30 days
paths:
- result
mkdir -p ./out
afl-fuzz -i in -o ./out -- ./fuzz_main &
PID=$!
sleep 300
kill -9 $PID
\ No newline at end of file
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
in
{
in rec {
rpn-calculator = pkgs.callPackage ./nix/build.nix {};
rpn-calculator-fuzz = rpn-calculator.overrideAttrs (old:{
doCheck=true;
makeFlags=["fuzz_main"];
checkPhase=''
chmod +x fuzzing.sh
./fuzzing.sh
[[ -z "$(ls -A ./out/crashes/)" ]] && exit 0 || exit 1
'';
});
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment