Skip to content

Commit 4730172

Browse files
authored
Remove testing of s2wasm via the wasm waterfall scripts (#1604)
The wasm waterfall is moving away from testing with s2wasm and s2wasm hopefully going to be removed soon.
1 parent e435265 commit 4730172

File tree

7 files changed

+6
-126
lines changed

7 files changed

+6
-126
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
22
ignore = E111,E114,E501,E121
3-
exclude = ./test/emscripten,./test/waterfall,./test/spec,./test/wasm-install
3+
exclude = ./test/emscripten,./test/spec,./test/wasm-install

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[submodule "test/spec"]
22
path = test/spec
33
url = https://github.com/WebAssembly/testsuite.git
4-
[submodule "test/waterfall"]
5-
path = test/waterfall
6-
url = https://github.com/WebAssembly/waterfall.git
74
[submodule "test/emscripten"]
85
path = test/emscripten
96
url = https://github.com/kripken/emscripten.git

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ jobs:
3030
- npm install jsvu -g
3131
- export PATH="${HOME}/.jsvu:${PATH}"
3232
- jsvu --os=linux64 --engines=spidermonkey
33-
before_script:
34-
- ./check.py --test-waterfall --only-prepare
3533
script:
3634
- set -o errexit
3735
- flake8
@@ -40,7 +38,7 @@ jobs:
4038
- cmake ${TRAVIS_BUILD_DIR} -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" -DCMAKE_INSTALL_PREFIX=install
4139
- make -j2 install
4240
- cd ${TRAVIS_BUILD_DIR}
43-
- ./check.py --test-waterfall --binaryen-bin=${BUILD_SUBDIR}/install/bin
41+
- ./check.py --binaryen-bin=${BUILD_SUBDIR}/install/bin
4442

4543
- <<: *test-ubuntu
4644
env: |
@@ -96,12 +94,10 @@ jobs:
9694
install:
9795
- alpine apk update
9896
- alpine apk add build-base cmake git python2
99-
before_script:
100-
- alpine ./check.py --test-waterfall --only-prepare
10197
script:
10298
- alpine cmake .
10399
- alpine make -j2
104-
- alpine ./check.py --test-waterfall
100+
- alpine ./check.py
105101

106102
# Build statically linked release binaries with gcc 6.3 on Alpine Linux
107103
# (inside chroot). If building a tagged commit, then deploy release tarball

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ The `check.py` script supports some options:
225225
* If an interpreter is provided, we run the output through it, checking for parse errors.
226226
* If tests are provided, we run exactly those. If none are provided, we run them all.
227227
* Some tests require `emcc` or `nodejs` in the path. They will not run if the tool cannot be found, and you'll see a warning.
228-
* We have tests from upstream in `tests/spec` and `tests/waterfall`, in git submodules. Running `./check.py` should update those.
228+
* We have tests from upstream in `tests/spec`, in git submodules. Running `./check.py` should update those.
229229

230230
## Design Principles
231231

check.py

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
from scripts.test.support import run_command, split_wast, node_test_glue, node_has_webassembly
2323
from scripts.test.shared import (
24-
BIN_DIR, EMCC, MOZJS, NATIVECC, NATIVEXX, NODEJS, S2WASM_EXE,
25-
WASM_AS, WASM_CTOR_EVAL, WASM_OPT, WASM_SHELL, WASM_MERGE, WASM_SHELL_EXE, WASM_METADCE,
24+
BIN_DIR, EMCC, MOZJS, NATIVECC, NATIVEXX, NODEJS,
25+
WASM_AS, WASM_CTOR_EVAL, WASM_OPT, WASM_SHELL, WASM_MERGE, WASM_METADCE,
2626
WASM_DIS, WASM_REDUCE, binary_format_check, delete_from_orbit, fail, fail_with_error,
2727
fail_if_not_identical, fail_if_not_contained, has_vanilla_emcc,
2828
has_vanilla_llvm, minify_check, num_failures, options, tests,
@@ -461,50 +461,6 @@ def run_validator_tests():
461461
run_command(cmd)
462462

463463

464-
def run_torture_tests():
465-
print '\n[ checking torture testcases... ]\n'
466-
467-
# torture tests are parallel anyhow, don't create multiple threads in each child
468-
old_cores = os.environ.get('BINARYEN_CORES')
469-
try:
470-
os.environ['BINARYEN_CORES'] = '1'
471-
472-
unexpected_result_count = 0
473-
474-
import test.waterfall.src.link_assembly_files as link_assembly_files
475-
s2wasm_torture_out = os.path.abspath(os.path.join(options.binaryen_test, 's2wasm-torture-out'))
476-
if os.path.isdir(s2wasm_torture_out):
477-
shutil.rmtree(s2wasm_torture_out)
478-
os.mkdir(s2wasm_torture_out)
479-
unexpected_result_count += link_assembly_files.run(
480-
linker=os.path.abspath(S2WASM_EXE),
481-
files=os.path.abspath(os.path.join(options.binaryen_test, 'torture-s', '*.s')),
482-
fails=[os.path.abspath(os.path.join(options.binaryen_test, 's2wasm_known_gcc_test_failures.txt'))],
483-
attributes=['O2'],
484-
out=s2wasm_torture_out,
485-
args=None)
486-
assert os.path.isdir(s2wasm_torture_out), 'Expected output directory %s' % s2wasm_torture_out
487-
488-
import test.waterfall.src.execute_files as execute_files
489-
unexpected_result_count += execute_files.run(
490-
runner=os.path.abspath(WASM_SHELL_EXE),
491-
files=os.path.abspath(os.path.join(s2wasm_torture_out, '*.wast')),
492-
fails=[os.path.abspath(os.path.join(options.binaryen_test, 's2wasm_known_binaryen_shell_test_failures.txt'))],
493-
attributes=['O2'],
494-
out='',
495-
wasmjs='')
496-
497-
shutil.rmtree(s2wasm_torture_out)
498-
if unexpected_result_count:
499-
fail('%s failures' % unexpected_result_count, '0 failures')
500-
501-
finally:
502-
if old_cores:
503-
os.environ['BINARYEN_CORES'] = old_cores
504-
else:
505-
del os.environ['BINARYEN_CORES']
506-
507-
508464
def run_vanilla_tests():
509465
print '\n[ checking emcc WASM_BACKEND testcases...]\n'
510466

@@ -681,8 +637,6 @@ def main():
681637
lld.test_wasm_emscripten_finalize()
682638
wasm2asm.test_wasm2asm()
683639
run_validator_tests()
684-
if options.torture and options.test_waterfall:
685-
run_torture_tests()
686640
if has_vanilla_emcc and has_vanilla_llvm and 0:
687641
run_vanilla_tests()
688642
print '\n[ checking example testcases... ]\n'

scripts/test/shared.py

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import shutil
2020
import subprocess
2121
import sys
22-
import urllib2
2322

2423

2524
def parse_args(args):
@@ -32,17 +31,6 @@ def parse_args(args):
3231
parser.add_argument(
3332
'--no-torture', dest='torture', action='store_false',
3433
help='Disables running the torture testcases.')
35-
parser.add_argument(
36-
'--only-prepare', dest='only_prepare', action='store_true', default=False,
37-
help='If enabled, only fetches the waterfall build. Default: false.')
38-
parser.add_argument(
39-
'--test-waterfall', dest='test_waterfall', action='store_true',
40-
default=False,
41-
help=('If enabled, fetches and tests the LLVM waterfall builds.'
42-
' Default: false.'))
43-
parser.add_argument(
44-
'--no-test-waterfall', dest='test_waterfall', action='store_false',
45-
help='Disables downloading and testing of the LLVM waterfall builds.')
4634
parser.add_argument(
4735
'--abort-on-first-failure', dest='abort_on_first_failure',
4836
action='store_true', default=True,
@@ -188,9 +176,6 @@ def is_exe(fpath):
188176
WASM_EMSCRIPTEN_FINALIZE = [os.path.join(options.binaryen_bin,
189177
'wasm-emscripten-finalize')]
190178

191-
S2WASM_EXE = S2WASM[0]
192-
WASM_SHELL_EXE = WASM_SHELL[0]
193-
194179

195180
def wrap_with_valgrind(cmd):
196181
# Exit code 97 is arbitrary, used to easily detect when an error occurs that
@@ -223,59 +208,8 @@ def has_shell_timeout():
223208
return get_platform() != 'windows' and os.system('timeout 1s pwd') == 0
224209

225210

226-
def fetch_waterfall():
227-
rev = open(os.path.join(options.binaryen_test, 'revision')).read().strip()
228-
buildername = get_platform()
229-
local_rev_path = os.path.join(WATERFALL_BUILD_DIR, 'local-revision')
230-
if os.path.exists(local_rev_path):
231-
with open(local_rev_path) as f:
232-
local_rev = f.read().strip()
233-
if local_rev == rev:
234-
return
235-
# fetch it
236-
basename = 'wasm-binaries-' + rev + '.tbz2'
237-
url = '/'.join(['https://storage.googleapis.com/wasm-llvm/builds',
238-
buildername, rev, basename])
239-
print '(downloading waterfall %s: %s)' % (rev, url)
240-
downloaded = urllib2.urlopen(url).read().strip()
241-
fullname = os.path.join(options.binaryen_test, basename)
242-
open(fullname, 'wb').write(downloaded)
243-
print '(unpacking)'
244-
if os.path.exists(WATERFALL_BUILD_DIR):
245-
shutil.rmtree(WATERFALL_BUILD_DIR)
246-
os.mkdir(WATERFALL_BUILD_DIR)
247-
subprocess.check_call(['tar', '-xf', os.path.abspath(fullname)],
248-
cwd=WATERFALL_BUILD_DIR)
249-
print '(noting local revision)'
250-
with open(local_rev_path, 'w') as o:
251-
o.write(rev + '\n')
252-
253-
254211
has_vanilla_llvm = False
255212

256-
257-
def setup_waterfall():
258-
# if we can use the waterfall llvm, do so
259-
global has_vanilla_llvm
260-
CLANG = os.path.join(BIN_DIR, 'clang')
261-
print 'trying waterfall clang at', CLANG
262-
try:
263-
subprocess.check_call([CLANG, '-v'])
264-
has_vanilla_llvm = True
265-
print '...success'
266-
except (OSError, subprocess.CalledProcessError) as e:
267-
warn('could not run vanilla LLVM from waterfall: ' + str(e) +
268-
', looked for clang at ' + CLANG)
269-
270-
271-
if options.test_waterfall:
272-
fetch_waterfall()
273-
setup_waterfall()
274-
275-
if options.only_prepare:
276-
print 'waterfall is fetched and setup, exiting since --only-prepare'
277-
sys.exit(0)
278-
279213
# external tools
280214

281215
try:

test/waterfall

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)