diff --git a/src/ntrip_client/nmea_fuzz_test.py b/src/ntrip_client/nmea_fuzz_test.py new file mode 100644 index 0000000..d8f8ae5 --- /dev/null +++ b/src/ntrip_client/nmea_fuzz_test.py @@ -0,0 +1,19 @@ + +try: + import atheris +except ImportError: + raise ImportError("You need to install atheris to run this script.") +import sys + +with atheris.instrument_imports(): + from nmea_parser import NMEAParser + + +def TestOneInput(data): + parser = NMEAParser() + parser.is_valid_sentence(data) + + +atheris.Setup(sys.argv, TestOneInput) +atheris.Fuzz() + diff --git a/src/ntrip_client/rtcm_fuzz_test.py b/src/ntrip_client/rtcm_fuzz_test.py new file mode 100644 index 0000000..e4ad712 --- /dev/null +++ b/src/ntrip_client/rtcm_fuzz_test.py @@ -0,0 +1,19 @@ + +try: + import atheris +except ImportError: + raise ImportError("You need to install atheris to run this script.") +import sys + +with atheris.instrument_imports(): + from rtcm_parser import RTCMParser + + +def TestOneInput(data): + parser = RTCMParser() + parser.parse(data) + + +atheris.Setup(sys.argv, TestOneInput) +atheris.Fuzz() +