From 48e457204f25bee04da44d231f490edd9c50e0af Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Wed, 19 Jan 2022 14:58:40 +1100 Subject: [PATCH] Add "./build-{example,fuzz}.sh" instructions --- example/README.md | 16 ++++++++++++++++ fuzz/c/std/README.md | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/example/README.md b/example/README.md index 6758b8bb..7337775c 100644 --- a/example/README.md +++ b/example/README.md @@ -1,3 +1,5 @@ +# Wuffs' Example Programs + This directory contains example programs that use [Wuffs the Library](/doc/wuffs-the-library.md). See [Hello `wuffs-c`](/hello-wuffs-c) for an example program that uses [Wuffs the Language](/doc/wuffs-the-language.md) @@ -8,3 +10,17 @@ not just programming language toys at the "calculate the Fibonacci sequence" level of triviality. For example, the [example/crc32](/example/crc32/crc32.cc) and [example/zcat](/example/zcat/zcat.c) programs are roughly equivalent to Debian Linux's `/usr/bin/crc32` and `/bin/zcat` programs. + + +## Building + +Running `build-example.sh` from the top level directory will build all of the +examples. To check out and build just one, such as `jsonptr`: + + git clone https://github.com/google/wuffs.git + cd wuffs + ./build-example.sh example/jsonptr + +When re-building, you only need the last of those three lines. To run it: + + gen/bin/example-jsonptr test/data/json-things.unformatted.json diff --git a/fuzz/c/std/README.md b/fuzz/c/std/README.md index b179172f..e75bcbf9 100644 --- a/fuzz/c/std/README.md +++ b/fuzz/c/std/README.md @@ -1,3 +1,5 @@ +# Wuffs' Fuzzer Programs + This directory contains multiple programs to fuzz Wuffs' implementations of various codecs. For example, `gif_fuzzer.c` is a program to fuzz Wuffs' GIF implementation. @@ -11,3 +13,17 @@ When working on these files, it is possible to run them directly on an explicit test suite, in order to speed up the edit-compile-run cycle. Look for `WUFFS_CONFIG__FUZZLIB_MAIN` for more details, and in `seed_corpora.txt` for suggested test data. + + +## Building + +Running `build-fuzz.sh` from the top level directory will build all of the +fuzzers. To check out and build just one, such as `json_fuzzer`: + + git clone https://github.com/google/wuffs.git + cd wuffs + ./build-fuzz.sh fuzz/c/std/json_fuzzer.cc + +When re-building, you only need the last of those three lines. To run it: + + gen/bin/fuzz-json test/data/json-things.*