diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-01-06 11:54:50 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-01-06 12:02:05 +0200 |
commit | a5854b22214b229644014d88a5f5ef9fd7f86d64 (patch) | |
tree | d0650eea70c29c11fc74ea23f65d06b25a042e42 /subplot.py | |
parent | 8cf12026479d68bc54e846a3d08f84685fc066c1 (diff) | |
download | subplot-a5854b22214b229644014d88a5f5ef9fd7f86d64.tar.gz |
Add: progress reporting in generated test program
Diffstat (limited to 'subplot.py')
-rw-r--r-- | subplot.py | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +def create_file(ctx, filename=None): + with open(filename, 'wb') as f: + f.write(get_file(filename)) + +def run_docgen(ctx, md=None, output=None): + runcmd(ctx, ['cargo', 'run', '-q', '--bin', 'sp-docgen', md, '-o', output]) + +def run_codegen(ctx, filename=None): + pass + +def file_exists(ctx, filename=None): + pass + +def scenario_was_run(ctx, name=None): + pass + +def step_was_run(ctx, keyword=None, name=None): + pass + +def exit_code_zero(ctx): + pass + +import subprocess + +def runcmd(ctx, argv): + p = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = p.communicate("") + ctx['stdout'] = stdout + ctx['stderr'] = stderr + ctx['exit'] = p.returncode |