fix ./emsdk update of a *non*-git install (#271)
The non-git case was not well documented and not tested, and it was broken since we switched the build infrastructure. In the git case, an update is to do a git pull. In the non-git case, it downloads a zip and unpacks it. The old build infra apparently had builds created for this; instead, I made it download it directly from github. Perhaps we should consider creating builds for this as well eventually? Also add a test for this, so we never break it again.
This commit is contained in:
14
test.py
14
test.py
@@ -1,6 +1,8 @@
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
# Utilities
|
||||
|
||||
@@ -77,3 +79,15 @@ print('test 32-bit error')
|
||||
|
||||
failing_call_with_output('python %s install latest' % hack_emsdk('not is_os_64bit()', 'True'), 'this tool is only provided for 64-bit OSes')
|
||||
|
||||
print('test non-git update')
|
||||
|
||||
temp_dir = tempfile.mkdtemp()
|
||||
|
||||
for filename in os.listdir('.'):
|
||||
if not filename.startswith('.') and not os.path.isdir(filename):
|
||||
shutil.copyfile(filename, os.path.join(temp_dir, filename))
|
||||
|
||||
os.chdir(temp_dir)
|
||||
|
||||
check_call('python ./emsdk update')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user