THRIFT-5855: Add nodejs fuzzers
Add fuzzers for nodejs support, to improve the reliability/robustness of the implementation
diff --git a/lib/nodejs/Makefile.am b/lib/nodejs/Makefile.am
index 5be8161..0933701 100644
--- a/lib/nodejs/Makefile.am
+++ b/lib/nodejs/Makefile.am
@@ -17,8 +17,11 @@
# We call npm twice to work around npm issues
-stubs: $(top_srcdir)/test/v0.16/ThriftTest.thrift
+stubs: $(top_srcdir)/test/v0.16/ThriftTest.thrift $(top_srcdir)/test/v0.16/FuzzTestNoUuid.thrift
$(THRIFT) --gen js:node -o test/ $(top_srcdir)/test/v0.16/ThriftTest.thrift
+ $(THRIFT) --gen js:node -o test/fuzz/ $(top_srcdir)/test/v0.16/FuzzTestNoUuid.thrift
+ sed -i "s/require('thrift')/require(\"..\/..\/..\/lib\/thrift\")/" test/fuzz/gen-nodejs/FuzzTestNoUuid_types.js
+
deps-root: $(top_srcdir)/package.json
$(NPM) install $(top_srcdir)/ || $(NPM) install $(top_srcdir)/
@@ -38,6 +41,7 @@
clean-local:
$(RM) -r test/gen-*
+ $(RM) -r test/fuzz/gen-*
$(RM) -r $(top_srcdir)/node_modules
$(RM) -r test/episodic-code-generation-test/gen*
$(RM) -r test/episodic-code-generation-test/node_modules