Skip to content

Commit

Permalink
added --skip-capture and --ignore-failed-tests options, closes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
letsgetrandy committed Jun 19, 2013
1 parent d103d0e commit 9fc1156
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions bin/specter
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def call_casper(script, config):
script,
])
cmd.extend(config['args'])
return subprocess.Popen(cmd, cwd=config['testroot'])
return subprocess.Popen(cmd, cwd=config['paths']['testroot'])


PHANTOMJS_NATIVE_ARGS = [
Expand Down Expand Up @@ -150,16 +150,17 @@ for arg in SYS_ARGS:
else:
conf['args']['specter'].append(arg)

print conf
sys.exit(0)

os.chdir(conf['paths']['testroot'])

# run functional tests and gather screenshots
p = call_casper(
os.path.join(conf['paths']['path'], 'bin', 'testrunner.js'), conf)
sts = EX_OK
if "--skip-capture" not in conf['args']['specter']:
# run functional tests and gather screenshots
p = call_casper(
os.path.join(conf['paths']['path'], 'bin', 'testrunner.js'), conf)

sts = p.wait()
sts = p.wait()
if "--ignore-failed-tests" in conf['args']['specter']:
sts = EX_OK

if sts == EX_OK:
# compare the screen captures
Expand Down

0 comments on commit 9fc1156

Please sign in to comment.