ci(fuzzing): add fuzz testing to CI

Starting with vendor and SDEI tests.  This is an experimental add for
further additions if flow works as expected.

Change-Id: I48a11c9ec110cbf10f687b4c600596db22b6e195
Signed-off-by: Mark Dykes <mark.dykes@arm.com>
diff --git a/script/gen_smc_fuzz_tests.py b/script/gen_smc_fuzz_tests.py
new file mode 100755
index 0000000..5e1c2ed
--- /dev/null
+++ b/script/gen_smc_fuzz_tests.py
@@ -0,0 +1,58 @@
+# !/usr/bin/env python
+#
+# Copyright (c) 2025 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+
+#python3 gen_smc_fuzz_tests.py -n <number of tests>
+#This script generates the tftf config and group files for fuzzing
+import argparse
+import random
+
+parser = argparse.ArgumentParser(
+                prog='gen_smc_fuzz_tests.py',
+                description='Generates the tftf config and group files for fuzzing tests in CI',
+                epilog='one argument input')
+
+parser.add_argument('-n', '--numtests',help="number of tests")
+
+args = parser.parse_args()
+
+print("starting fuzzing generation of tests for CI")
+
+gitadd = "git add "
+
+for i in range(int(args.numtests)):
+	rnum = str(hex(random.randint(1, 100000000)))
+	tftfconfilename = "fvp-smcfuzzing_" + rnum
+	tftfconfilenamepath = "../tftf_config/" + tftfconfilename
+	configfile = open(tftfconfilenamepath, "w")
+	cline = "CROSS_COMPILE=aarch64-none-elf-\n"
+	cline += "PLAT=fvp\n"
+	cline += "TESTS=smcfuzzing\n"
+	cline += "SMC_FUZZING=1\n"
+	cline += "SMC_FUZZ_DTS=smc_fuzz/dts/sdei_coverage.dts\n"
+	cline += "SMC_FUZZER_DEBUG=1\n"
+	cline += "SMC_FUZZ_SANITY_LEVEL=3\n"
+	cline += "SMC_FUZZ_CALLS_PER_INSTANCE=10000\n"
+	cline += "SMC_FUZZ_DEFFILE=sdei_and_vendor_smc_calls.txt\n"
+	cline += "SMC_FUZZ_SEEDS=" + rnum
+	configfile.write(cline)
+	configfile.close()
+	groupfile = "fvp-aarch64-sdei," + tftfconfilename + ":fvp-tftf-fip.tftf-aemv8a-tftf.fuzz"
+	groupfilepath = "../group/tf-l3-fuzzing/" + groupfile
+	gfile = open(groupfilepath, "w")
+	gline = "#\n"
+	gline += "# Copyright (c) 2025, Arm Limited. All rights reserved.\n"
+	gline += "#\n"
+	gline += "# SPDX-License-Identifier: BSD-3-Clause\n"
+	gline += "#\n"
+	gfile.write(gline)
+	gfile.close()
+	gitadd += "./tftf_config/" + tftfconfilename + " "
+	gitadd += "./group/tf-l3-fuzzing/" + groupfile + " "
+gaddcom = open("../gitadd", "w")
+gaddcom.write(gitadd)
+gaddcom.close()