def main():
    template_data = common.read_file(TEST_HTML_TEMPLATE_FILE)
    template = Template(template_data)
    for directory in DIRECTORIES_WITH_TESTS:
        for js_file_path in common.get_files_with_suffix(
                directory, "_test.js"):
            _gen_test_html(js_file_path, template)
Beispiel #2
0
def main():
    common.cd_to_firebaseauth_root()
    template_data = _read_file("./buildtools/test_template.html")
    template = Template(template_data)
    for directory in DIRECTORIES_WITH_TESTS:
        for js_path in common.get_files_with_suffix(directory, "_test.js"):
            _gen_html(js_path, template)
def _print_test_files_under_root(root):
    """Prints all test HTML files found under a given directory (recursively).
  Args:
    root: The path to the directory.
  """
    for file_name in common.get_files_with_suffix(root, "_test.html"):
        print "  '%s'," % file_name[2:]  # Ignore the beginning './'.
def main():
  common.cd_to_firebaseui_root()
  template_data = _read_file("./buildtools/test_template.html")
  template = Template(template_data)
  for directory in DIRECTORIES_WITH_TESTS:
    for js_path in common.get_files_with_suffix(directory, "_test.js"):
      _gen_html(js_path, template)
def _print_test_files_under_root(root):
  """Prints all test HTML files found under a given directory (recursively).

  Args:
    root: The path to the directory.
  """
  for file_name in common.get_files_with_suffix(root, "_test.html"):
    print "  '%s'," % file_name[2:]  # Ignore the beginning './'.
def main():
    template_data = common.read_file(ALL_TESTS_TEMPLATE_FILE)
    template = Template(template_data)

    test_html_paths = []
    for file_name in common.get_files_with_suffix(
            common.GENERATED_TEST_BASE_PATH, '_test.html'):
        test_html_paths.append("  '%s/%s'," % (GRPC_WEB_BASE_DIR, file_name))
    # Example output paths:
    # 'packages/grpc-web/generated/test_htmls/javascript__net__grpc__web__grpcwebclientbase_test.html',
    # 'packages/grpc-web/generated/test_htmls/javascript__net__grpc__web__grpcwebstreamparser_test.html',
    test_html_paths_str = "\n".join(test_html_paths)

    # Writes the generated output to the all_tests.js file.
    common.write_file(GENERATED_ALL_TESTS_JS_PATH,
                      template.substitute(test_html_paths=test_html_paths_str))