diff --git a/src/ntrip_client/nmea_fuzz_test.py b/src/ntrip_client/nmea_fuzz_test.py new file mode 100644 index 0000000..af82d86 --- /dev/null +++ b/src/ntrip_client/nmea_fuzz_test.py @@ -0,0 +1,17 @@ +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..ab73336 --- /dev/null +++ b/src/ntrip_client/rtcm_fuzz_test.py @@ -0,0 +1,17 @@ +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()