Don't force re-download of all archives during install (#411)

Only do this for the new `emscripten-releases`.   These all install
the the same directory so we can't use the presence of the directory
to know if we have already installed them.
This commit is contained in:
Sam Clegg
2019-12-11 16:55:06 -06:00
committed by GitHub
parent 9c60ff91d1
commit 322c7aa727
2 changed files with 13 additions and 7 deletions

View File

@@ -135,6 +135,12 @@ print('clear cache')
check_call(upstream_emcc + ' --clear-cache')
assert not os.path.exists(LIBC)
# Test the normal tools like node don't re-download on re-install
print('another install must re-download')
checked_call_with_output(emsdk + ' uninstall node-12.9.1-64bit')
checked_call_with_output(emsdk + ' install node-12.9.1-64bit', expected='Downloading:', unexpected='already exist in destination')
checked_call_with_output(emsdk + ' install node-12.9.1-64bit', unexpected='Downloading:', expected='already exist in destination')
print('test tot-upstream')
run_emsdk('install tot-upstream')
assert not os.path.exists(LIBC)
@@ -157,7 +163,7 @@ run_emsdk('activate sdk-1.38.31-64bit')
print('test specific release (new, short name)')
run_emsdk('install 1.38.33')
print('another install must re-download')
checked_call_with_output(emsdk + ' install 1.38.33', expected='Downloading:', unexpected='already exist in destination')
checked_call_with_output(emsdk + ' install 1.38.33', expected='Downloading:')
run_emsdk('activate 1.38.33')
assert 'upstream' not in open(os.path.expanduser('~/.emscripten')).read()
assert 'fastcomp' in open(os.path.expanduser('~/.emscripten')).read()