- proc = subprocess.Popen(cmd, cwd=context.nominatim.build_dir, env=env,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-
- (outp, err) = proc.communicate()
- outp = outp.decode('utf-8')
- err = err.decode("utf-8")
-
- logger.debug("Result: \n===============================\n"
- + outp + "\n===============================\n")
-
- assert_equals(0, proc.returncode,
- "%s failed with message: %s" % (
- os.path.basename(env['SCRIPT_FILENAME']),
- err))
+ outp, err = run_script(cmd, cwd=context.nominatim.website_dir.name, env=env)