Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Merge conflicts preventing auto-update in testsuite repo

Aperta
#240 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python, wasm

Direzione di ricerca

Inizia dai marcatori di conflitto in test/build.py, in particolare convert_wast_to_js, HTML_HEADER e build_html_js. Confronta le sezioni HEAD e origin/main con il flusso di build previsto del repository testsuite. Il lavoro è completato quando i conflitti sono risolti e testsuite può nuovamente recuperare automaticamente i test più recenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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')
Lingua principale
WebAssembly
Stelle
767
Fork
54
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WebAssembly/threads

Tutte le issue di WebAssembly/threads

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.