Merge conflicts preventing auto-update in testsuite repo
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python, wasm
- Domain
- build-system, testing-qa
Research direction
Start with the conflict markers in test/build.py, especially convert_wast_to_js, HTML_HEADER, and build_html_js. Compare the HEAD and origin/main sections with the testsuite repository's expected build flow. Done means the conflicts are resolved and the testsuite can automatically pull the latest tests again.
Written by the indexing model from the issue text.
Description
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')
- Dominant language
- WebAssembly
- Stars
- 767
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WebAssembly/threads
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WebAssembly/threads#254 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
WebAssembly/threads#253 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
WebAssembly/threads#245 · 1 reaction ·
-
Branch renaming Open
Difficulty 1/5 Under an hour Newbie friendliness 20/100
WebAssembly/threads#237 ·
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
WebAssembly/threads#234 · 3 comments ·
All issues in WebAssembly/threads
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
area:engineering priority:p2 type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jejjohnson/pyrox#234 ·
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 85/100
ros2/ros2_tracing#266 · 1 comment ·