summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2022-02-10 15:04:52 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2022-02-10 15:04:52 +0000
commit08cefb0e7490dd229eed93a556591c1993eee07b (patch)
tree7c3a36630e336d393a955d19f5e8069fd7949258
parentd7485e7632c3625a6c179e12cecbc5b0c1bb73bd (diff)
downloadSmarker-08cefb0e7490dd229eed93a556591c1993eee07b.tar.gz
Smarker-08cefb0e7490dd229eed93a556591c1993eee07b.zip
added getting full runtime analysis output
-rw-r--r--ExampleSubmission/example.py2
-rw-r--r--reflect.py1
-rw-r--r--smarker.conf7
-rw-r--r--templates/txt.jinja26
4 files changed, 12 insertions, 4 deletions
diff --git a/ExampleSubmission/example.py b/ExampleSubmission/example.py
index 9c1d06a..7029b33 100644
--- a/ExampleSubmission/example.py
+++ b/ExampleSubmission/example.py
@@ -71,4 +71,4 @@ def greet(*names, greeting="Hello"):
print(greeting, name)
if __name__ == "__main__":
- print(hello_world(int(sys.argv[1]))) \ No newline at end of file
+ print(hello_world(int(sys.argv[1])) + "\n\nowo" ) \ No newline at end of file
diff --git a/reflect.py b/reflect.py
index 6ee470a..da6e998 100644
--- a/reflect.py
+++ b/reflect.py
@@ -362,6 +362,7 @@ def gen_reflection_report(client_code_path, assessment_struct, student_no, confi
for regex_ in contents["regexes"]:
matches[regex_] = re.findall(regex_, lines)
required_files_features["run"][j][cmd]["regexes"] = matches
+ required_files_features["run"][j][cmd]["full_output"] = lines
out["test_results"] = reflection.run_tests(tests_to_run, configuration["out"] == "stdout" and configuration["format"] in ["text", "txt"])
out["class_tree"] = reflection.get_class_tree()
diff --git a/smarker.conf b/smarker.conf
index 84d8c5c..1d6b9da 100644
--- a/smarker.conf
+++ b/smarker.conf
@@ -9,6 +9,7 @@ show_full_docs = True
show_source = True
[txt]
-show_full_docs = False
-show_source = False
-show_all_regex_occurrences = True \ No newline at end of file
+show_full_docs = True
+show_source = True
+show_all_regex_occurrences = True
+show_all_run_output = False \ No newline at end of file
diff --git a/templates/txt.jinja2 b/templates/txt.jinja2
index df63288..b27abda 100644
--- a/templates/txt.jinja2
+++ b/templates/txt.jinja2
@@ -125,6 +125,12 @@ Report generated at {{ get_datetime() }}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
+ {%- if txt_show_all_run_output == "True" %}
+ Full runtime output:
+ ```
+ {{ runtime_contents["full_output"]|indent(20, False) }}
+ ```
+ {%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}