def app_record(app_dir,inst_app_dir,jalangi=util.DEFAULT_INSTALL): selenium_util = load_selenium(jalangi) # start up web server in parent directory os.chdir("..") sp = subprocess.Popen(["python","-m","SimpleHTTPServer","8181"]) os.chdir("jalangi_tmp") try: exercise_fn = get_app_exercise_fn(inst_app_dir) url = "http://localhost:8181/" + os.path.relpath(os.path.abspath(os.path.join(inst_app_dir,'index.html')), jalangi.get_home()) result = selenium_util.run_url_in_selenium(url, selenium_util.get_regression_msgs_and_trace(False,exercise_fn)) return result finally: sp.kill()
def app_record(app_dir, inst_app_dir, jalangi=util.DEFAULT_INSTALL): selenium_util = load_selenium(jalangi) # start up web server in parent directory os.chdir("..") sp = subprocess.Popen(["python", "-m", "SimpleHTTPServer", "8181"]) os.chdir("jalangi_tmp") try: exercise_fn = get_app_exercise_fn(inst_app_dir) url = "http://localhost:8181/" + os.path.relpath( os.path.abspath(os.path.join(inst_app_dir, 'index.html')), jalangi.get_home()) result = selenium_util.run_url_in_selenium( url, selenium_util.get_regression_msgs_and_trace(False, exercise_fn)) return result finally: sp.kill()
def app_run(app_dir,jalangi=util.DEFAULT_INSTALL): selenium_util = load_selenium(jalangi) # start up web server in parent directory # get rid of .js appended by default app_dir = os.path.splitext(app_dir)[0] os.chdir("..") sp = subprocess.Popen(["python","-m","SimpleHTTPServer","8181"]) os.chdir("jalangi_tmp") try: exercise_fn = get_app_exercise_fn(app_dir) html_to_load = os.path.join(app_dir,'index.html') url = "http://localhost:8181/" + os.path.relpath(html_to_load,jalangi.get_home()) result = selenium_util.run_url_in_selenium(url, selenium_util.get_regression_msgs(False,exercise_fn)) return result finally: sp.kill()
def app_run(app_dir, jalangi=util.DEFAULT_INSTALL): selenium_util = load_selenium(jalangi) # start up web server in parent directory # get rid of .js appended by default app_dir = os.path.splitext(app_dir)[0] os.chdir("..") sp = subprocess.Popen(["python", "-m", "SimpleHTTPServer", "8181"]) os.chdir("jalangi_tmp") try: exercise_fn = get_app_exercise_fn(app_dir) html_to_load = os.path.join(app_dir, 'index.html') url = "http://localhost:8181/" + os.path.relpath( html_to_load, jalangi.get_home()) result = selenium_util.run_url_in_selenium( url, selenium_util.get_regression_msgs(False, exercise_fn)) return result finally: sp.kill()