added cleanup test and test-re-runner automation script

This commit is contained in:
Kevin Froman 2020-03-09 21:43:18 -05:00
parent 4e053f1b30
commit a8290e2ac3
7 changed files with 90 additions and 10 deletions

View file

@ -3,4 +3,5 @@ This directory contains useful scripts and utilities that don't make sense to in
passphrase-generator.py: very simple utility to generate and print a strong passphrase to stdout. 256 bits of entropy by default.
enable-dev-config.py/disable-dev-config.py: enable/disable dev default config setup
block-spammer.py: attack tool for spamming blocks
announce-attack.py: flood a node with false nodes
announce-attack.py: flood a node with false nodes
run-unit-test-by-name: runs a unit test (no browser, runtime or intgegration test) by name

View file

@ -4,6 +4,8 @@
import json
input("enter to continue") # hack to avoid vscode term input
conf = json.load(open('static-data/default_config.json', 'r'))
block_pow = int(input("Block POW level:"))

View file

@ -0,0 +1,20 @@
#!/usr/bin/env python3
import os
from time import sleep
input("enter to continue") # hack to avoid vscode term input
test = input("test file name:")
if not test.endswith('.py'):
test += '.py'
if os.path.exists(f'tests/{test}'):
try:
while True:
os.system(f'python3 tests/{test}')
if input("Enter to run again or n to stop:").lower().strip() == 'n':
break
except KeyboardInterrupt:
pass
else:
print('No test found')