Skip to content

Merge conflicts preventing auto-update in testsuite repo #240

@tlively

Description

@tlively

These merge conflicts with the upstream spec are preventing the testsuite repo from automatically pulling in the latest tests from this repo:

diff --cc test/build.py
index b67b0edd,6c105783..00000000
--- a/test/build.py
+++ b/test/build.py
@@@ -68,26 -70,8 +71,31 @@@ def convert_wast_to_js(out_js_dir, infi
  
      inputs = []
  
++<<<<<<< HEAD
 +    test_directories = ['.', 'simd', 'threads']
 +    if infile_pat is not None:
 +        test_directories = ['.']
 +    else:
 +        infile_pat = '*.wast'
 +
 +    wast_files = []
 +    wast_files_in_d = []  # to keep sortedness of files, as glob doesn't guarantee order.
 +
 +    for d in test_directories:
 +        for wast_file in glob.glob(os.path.join(WAST_TESTS_DIR, d, infile_pat)):
 +            wast_files_in_d.append(wast_file)
 +        wast_files_in_d.sort()
 +        wast_files = wast_files + wast_files_in_d
 +        wast_files_in_d = []
 +
 +    if (shuffle):
 +        random.shuffle(wast_files)
 +
 +    for wast_file in wast_files:
++=======
+     for wast_file in glob.glob(os.path.join(WAST_TESTS_DIR, '**/*.wast'),
+                                recursive = True):
++>>>>>>> origin/main
          # Don't try to compile tests that are supposed to fail.
          if '.fail.' in wast_file:
              continue
@@@ -132,10 -119,9 +143,16 @@@ HTML_HEADER = """<!doctype html
      </head>
      <body>
  
++<<<<<<< HEAD
 +        <meta name="timeout" content="long">
 +        <script src={WPT_PREFIX}/testharness.js></script>
 +        <script src={WPT_PREFIX}/testharnessreport.js></script>
 +        <script src={PREFIX}/{JS_HARNESS}></script>
++=======
+         <script src="{WPT_PREFIX}/testharness.js"></script>
+         <script src="{WPT_PREFIX}/testharnessreport.js"></script>
+         <script src="{PREFIX}/{JS_HARNESS}"></script>
++>>>>>>> origin/main
  
          <div id=log></div>
  """
@@@ -159,32 -142,39 +176,53 @@@ def wrap_single_test(js_file)
      with open(js_file, 'w') as f:
          f.write(content)
  
 -def build_html_js(out_dir):
 +def build_html_js(out_dir, infile_pat, shuffle):
      ensure_empty_dir(out_dir)
+     for d in WAST_TEST_SUBDIRS:
+         ensure_empty_dir(os.path.join(out_dir, d))
      copy_harness_files(out_dir, True)
  
 -    tests = convert_wast_to_js(out_dir)
 +    tests = convert_wast_to_js(out_dir, infile_pat, shuffle)
      for js_file in tests:
          wrap_single_test(js_file)
      return tests
  
  def build_html_from_js(tests, html_dir, use_sync):
      for js_file in tests:
-         js_filename = os.path.basename(js_file)
-         html_filename = js_filename + '.html'
-         html_file = os.path.join(html_dir, html_filename)
+         subdir = os.path.basename(os.path.dirname(js_file))
+         js_prefix = '../js'
+         if subdir == 'js':
+             subdir = ''
+             js_prefix = './js'
+         js_filename = os.path.join(js_prefix, subdir, os.path.basename(js_file))
+         html_filename = os.path.basename(js_file) + '.html'
+         html_file = os.path.join(html_dir, subdir, html_filename)
          js_harness = "sync_index.js" if use_sync else "async_index.js"
++<<<<<<< HEAD
 +        js_worker = "sync_worker.js" if use_sync else "async_worker.js"
 +        with open(html_file, 'w+') as f:
 +            content = HTML_HEADER.replace('{PREFIX}', './js/harness') \
 +                                 .replace('{WPT_PREFIX}', './js/harness') \
 +                                 .replace('{JS_HARNESS}', js_harness) \
 +                                 .replace('{JS_WORKER}', js_worker)
 +            content += "        <script src=./js/{SCRIPT}></script>".replace('{SCRIPT}', js_filename)
 +            content += HTML_BOTTOM
 +            f.write(content)
 +
 +def build_html(html_dir, js_dir, infile_pat, shuffle, use_sync):
++=======
+         harness_dir = os.path.join(js_prefix, 'harness')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions