Regression tests
This commit is contained in:
parent
f67b5db2f9
commit
0786016436
1 changed files with 16 additions and 8 deletions
|
@ -21,9 +21,15 @@ ok = ":white_check_mark:"
|
|||
warning = ":warning:"
|
||||
error = ":negative_squared_cross_mark:"
|
||||
stress_duration = 10
|
||||
repeats = 10
|
||||
|
||||
|
||||
def print(*args, **kwargs):
|
||||
if "end" not in kwargs:
|
||||
kwargs["end"] = ""
|
||||
r = __builtin__.print(*args, **kwargs)
|
||||
__builtin__.print(" ")
|
||||
else:
|
||||
r = __builtin__.print(*args, **kwargs)
|
||||
__builtin__.print("\n", end="")
|
||||
return r
|
||||
|
@ -207,21 +213,21 @@ def show_git_info(src_dir):
|
|||
print("Repository not clean", warning)
|
||||
if diff:
|
||||
print("Diff:")
|
||||
print("```" + diff + "```")
|
||||
print("```\n" + diff + "\n```")
|
||||
if diff_staged:
|
||||
print("Diff staged:")
|
||||
print("```" + diff_staged + "```")
|
||||
print("```\n" + diff_staged + "\n```")
|
||||
|
||||
|
||||
def show_system_info():
|
||||
out, _ = run("lsb_release -sd", True).communicate()
|
||||
out.strip()
|
||||
out = out.strip()
|
||||
print("System:", out)
|
||||
out, _ = run("cat /proc/cpuinfo | grep 'model name' | head -n1 | cut -d ':' -f2", True).communicate()
|
||||
out.strip()
|
||||
out = out.strip()
|
||||
print("Hardware:", out)
|
||||
out, _ = run("cc --version | head -n1", True).communicate()
|
||||
out.strip()
|
||||
out = out.strip()
|
||||
print("Compiler:", out)
|
||||
|
||||
|
||||
|
@ -253,6 +259,7 @@ def compile_and_report(src_dir):
|
|||
def run_test(config, index):
|
||||
print("# Test", index)
|
||||
print("Config: [{0}]({1})".format(config.split("/")[-1].replace(".tint2rc", ""), "https://gitlab.com/o9000/tint2/blob/master/test/" + config))
|
||||
for i in range(repeats):
|
||||
test("./build/tint2", config)
|
||||
|
||||
|
||||
|
@ -264,6 +271,7 @@ def run_tests():
|
|||
for config in configs:
|
||||
index += 1
|
||||
run_test(config, index)
|
||||
print("")
|
||||
|
||||
|
||||
def get_default_src_dir():
|
||||
|
|
Loading…
Reference in a new issue