1.38.36 ; Check if all downloads exist for the latest version (#278)
This verifies all builders successfully uploaded builds for a new version that we tag here. This prevents a problem like happend on 1.38.35, where the mac and windows bots "skipped" the hash that we tagged - they built the one before, and I guess were too slow, so they skipped to the next commit after it? Which is expected I guess, but surprises me a little. Anyhow, with this fix we should avoid such problems in the future. Tags 1.38.36 to verify things work and get people a working version. Also check some other basic things: check the version built reports the right one in emcc -v, and that multiple emsdk updates still work.
This commit is contained in:
25
test.py
25
test.py
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
@@ -9,6 +10,12 @@ import tempfile
|
||||
def check_call(cmd):
|
||||
subprocess.check_call(cmd.split(' '))
|
||||
|
||||
def checked_call_with_output(cmd, expected, stderr=None):
|
||||
proc = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE, stderr=stderr)
|
||||
stdout, stderr = proc.communicate()
|
||||
assert not proc.returncode, 'call must have succeeded'
|
||||
assert expected in (stdout + stderr), 'call did not have the right output: ' + stdout + stderr
|
||||
|
||||
def failing_call_with_output(cmd, expected):
|
||||
proc = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
@@ -27,6 +34,8 @@ def hack_emsdk(marker, replacement):
|
||||
|
||||
open('hello_world.cpp', 'w').write('int main() {}')
|
||||
|
||||
TAGS = json.loads(open('emscripten-releases-tags.txt').read())
|
||||
|
||||
# Tests
|
||||
|
||||
print('update')
|
||||
@@ -44,6 +53,9 @@ assert open(os.path.expanduser('~/.emscripten')).read().count('LLVM_ROOT') == 1
|
||||
assert 'upstream' in open(os.path.expanduser('~/.emscripten')).read()
|
||||
assert 'fastcomp' not in open(os.path.expanduser('~/.emscripten')).read()
|
||||
|
||||
print('verify version')
|
||||
checked_call_with_output('upstream/emscripten/emcc -v', TAGS['latest'], stderr=subprocess.PIPE)
|
||||
|
||||
print('test tot-upstream')
|
||||
check_call('./emsdk install tot-upstream')
|
||||
check_call('./emsdk activate tot-upstream')
|
||||
@@ -89,5 +101,18 @@ for filename in os.listdir('.'):
|
||||
|
||||
os.chdir(temp_dir)
|
||||
|
||||
check_call('python ./emsdk update')
|
||||
print('second time')
|
||||
check_call('python ./emsdk update')
|
||||
|
||||
print('verify downloads exist for all OSes')
|
||||
latest_hash = TAGS['releases'][TAGS['latest']]
|
||||
for os, suffix in [
|
||||
('linux', 'tbz2'),
|
||||
('mac', 'tbz2'),
|
||||
('win', 'zip')
|
||||
]:
|
||||
url = 'https://storage.googleapis.com/webassembly/emscripten-releases-builds/%s/%s/wasm-binaries.%s' % (os, latest_hash, suffix)
|
||||
print(' url: ' + url),
|
||||
check_call('wget ' + url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user