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:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"latest": "1.38.35",
|
"latest": "1.38.36",
|
||||||
"releases": {
|
"releases": {
|
||||||
|
"1.38.36": "d46be49c2aab975333423122239892bd46f52bba",
|
||||||
"1.38.35": "98f49919f25e06fa557cbcb1321d4c10e60c87ca",
|
"1.38.35": "98f49919f25e06fa557cbcb1321d4c10e60c87ca",
|
||||||
"1.38.34": "048cf9424790cc525a7ea6da340820aae226f3b9",
|
"1.38.34": "048cf9424790cc525a7ea6da340820aae226f3b9",
|
||||||
"1.38.33": "3b8cff670e9233a6623563add831647e8689a86b"
|
"1.38.33": "3b8cff670e9233a6623563add831647e8689a86b"
|
||||||
|
|||||||
25
test.py
25
test.py
@@ -1,3 +1,4 @@
|
|||||||
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
@@ -9,6 +10,12 @@ import tempfile
|
|||||||
def check_call(cmd):
|
def check_call(cmd):
|
||||||
subprocess.check_call(cmd.split(' '))
|
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):
|
def failing_call_with_output(cmd, expected):
|
||||||
proc = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE)
|
proc = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE)
|
||||||
stdout, stderr = proc.communicate()
|
stdout, stderr = proc.communicate()
|
||||||
@@ -27,6 +34,8 @@ def hack_emsdk(marker, replacement):
|
|||||||
|
|
||||||
open('hello_world.cpp', 'w').write('int main() {}')
|
open('hello_world.cpp', 'w').write('int main() {}')
|
||||||
|
|
||||||
|
TAGS = json.loads(open('emscripten-releases-tags.txt').read())
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
|
|
||||||
print('update')
|
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 'upstream' in open(os.path.expanduser('~/.emscripten')).read()
|
||||||
assert 'fastcomp' not 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')
|
print('test tot-upstream')
|
||||||
check_call('./emsdk install tot-upstream')
|
check_call('./emsdk install tot-upstream')
|
||||||
check_call('./emsdk activate tot-upstream')
|
check_call('./emsdk activate tot-upstream')
|
||||||
@@ -89,5 +101,18 @@ for filename in os.listdir('.'):
|
|||||||
|
|
||||||
os.chdir(temp_dir)
|
os.chdir(temp_dir)
|
||||||
|
|
||||||
|
check_call('python ./emsdk update')
|
||||||
|
print('second time')
|
||||||
check_call('python ./emsdk update')
|
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