Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf-test.git/shortlog/fc5afc250049b3230f6f88f03ba2db4d29d5f96d
...commit 
http://git.netsurf-browser.org/netsurf-test.git/commit/fc5afc250049b3230f6f88f03ba2db4d29d5f96d
...tree 
http://git.netsurf-browser.org/netsurf-test.git/tree/fc5afc250049b3230f6f88f03ba2db4d29d5f96d

The branch, master has been updated
       via  fc5afc250049b3230f6f88f03ba2db4d29d5f96d (commit)
      from  68fc876578a877cd32b3a1606bed607f7dfb4f25 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf-test.git/commit/?id=fc5afc250049b3230f6f88f03ba2db4d29d5f96d
commit fc5afc250049b3230f6f88f03ba2db4d29d5f96d
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    Add monkey index CGI

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b25c15b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*~
diff --git a/cgi-bin/monkey-index.cgi b/cgi-bin/monkey-index.cgi
new file mode 100755
index 0000000..e9ce008
--- /dev/null
+++ b/cgi-bin/monkey-index.cgi
@@ -0,0 +1,35 @@
+#!/usr/bin/python3
+
+import cgi
+import cgitb
+cgitb.enable()
+
+import os
+
+import yaml
+
+docroot = os.environ["DOCUMENT_ROOT"]
+
+files = {}
+
+testroot = os.path.join(docroot, "monkey-test")
+
+for fname in os.listdir(testroot):
+    if not fname.endswith(".yaml"):
+        continue
+    with open(os.path.join(testroot, fname), "r") as fh:
+        files[fname] = yaml.load(fh)
+
+print('Content-Type: application/yaml')
+print('')
+
+for group in files["index.yaml"]:
+    print("---")
+    group["kind"] = "group"
+    print(yaml.dump(group, default_flow_style=False))
+    for f, content in files.items():
+        if type(content) == dict and content.get("group") == group["group"]:
+            d = {"kind": "test", "filename": f, "content": content}
+            print("---")
+            print(yaml.dump(d, default_flow_style=False))
+


-----------------------------------------------------------------------

Summary of changes:
 .gitignore               |    1 +
 cgi-bin/monkey-index.cgi |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 .gitignore
 create mode 100755 cgi-bin/monkey-index.cgi

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b25c15b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*~
diff --git a/cgi-bin/monkey-index.cgi b/cgi-bin/monkey-index.cgi
new file mode 100755
index 0000000..e9ce008
--- /dev/null
+++ b/cgi-bin/monkey-index.cgi
@@ -0,0 +1,35 @@
+#!/usr/bin/python3
+
+import cgi
+import cgitb
+cgitb.enable()
+
+import os
+
+import yaml
+
+docroot = os.environ["DOCUMENT_ROOT"]
+
+files = {}
+
+testroot = os.path.join(docroot, "monkey-test")
+
+for fname in os.listdir(testroot):
+    if not fname.endswith(".yaml"):
+        continue
+    with open(os.path.join(testroot, fname), "r") as fh:
+        files[fname] = yaml.load(fh)
+
+print('Content-Type: application/yaml')
+print('')
+
+for group in files["index.yaml"]:
+    print("---")
+    group["kind"] = "group"
+    print(yaml.dump(group, default_flow_style=False))
+    for f, content in files.items():
+        if type(content) == dict and content.get("group") == group["group"]:
+            d = {"kind": "test", "filename": f, "content": content}
+            print("---")
+            print(yaml.dump(d, default_flow_style=False))
+


-- 
NetSurf test cases

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to