sleep(3)
# Running the tests
- logging.info('Executing %s', cmd)
process(cmd, M.path, None, None)
# Kill the remaining processes
if args.unittest:
cmd.append(args.unittest)
cmd = ' '.join(cmd)
- logging.info('Executing %s', cmd)
process(cmd, M.get('path'), None, None)
except Exception as e:
raise e
shutil.copyfile(cli, dest)
cmd = '%s %s' % (C.get('php'), dest)
- logging.debug('Executing %s' % (cmd))
result = process(cmd, cwd=path, **cmdkwargs)
os.remove(dest)
elif cli.endswith('.sh'):
os.chmod(dest, stat.S_IRUSR | stat.S_IXUSR)
cmd = '%s' % (dest)
- logging.debug('Executing %s' % (cmd))
result = process(cmd, cwd=path, **cmdkwargs)
os.remove(dest)
else:
http://github.com/FMCorz/mdk
"""
-import sys
import os
import signal
import subprocess
import re
import threading
import getpass
+import logging
def yesOrNo(q):
def process(cmd, cwd=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE):
if type(cmd) != list:
cmd = shlex.split(str(cmd))
+ logging.debug(' '.join(cmd))
proc = subprocess.Popen(cmd, cwd=cwd, stdout=stdout, stderr=stderr)
(out, err) = proc.communicate()
return (proc.returncode, out, err)