From: Alice Akaki Date: Thu, 24 Nov 2022 18:00:12 +0000 (-0400) Subject: createst: Create a default README with every test X-Git-Tag: suricata-6.0.12~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2eaa0bab77d5c7a1a584ae4358825b4df447a71;p=thirdparty%2Fsuricata-verify.git createst: Create a default README with every test Feature: #5210 --- diff --git a/createst.py b/createst.py index 77554174c..2c500a185 100755 --- a/createst.py +++ b/createst.py @@ -126,6 +126,23 @@ def create_directory(path): sys.exit(1) +def create_readme(): + """ + Create a README.md file and write to it. + """ + readme_path = os.path.join(test_dir, "README.md") + with open(readme_path, "w+") as fp: + fp.write("Description\n") + fp.write("===========\n") + fp.write("\n\n") + fp.write("PCAP\n") + fp.write("====\n") + fp.write("\n\n") + fp.write("Reported by\n") + fp.write("===========\n") + fp.write("Your Name \n") + + def write_to_file(data): """ Check for the output test.yaml file if it exists, else create one and write @@ -443,6 +460,7 @@ def main(): init_global_params() create_directory(path=args["test-name"]) create_directory(path=os.path.join(args["test-name"], "output")) + create_readme() generate_eve()