|
3 | 3 | # University of Illinois/NCSA Open Source License. Both these licenses can be
|
4 | 4 | # found in the LICENSE file.
|
5 | 5 |
|
| 6 | +import glob |
6 | 7 | import os
|
7 | 8 | import platform
|
8 | 9 | import shutil
|
@@ -729,16 +730,24 @@ def test_embuilder_auto_tasks(self):
|
729 | 730 | # Unless --force is specified
|
730 | 731 | self.assertContained('Building targets: zlib', self.do([EMBUILDER, 'build', 'zlib', 'MINIMAL', '--force']))
|
731 | 732 |
|
732 |
| - def test_embuilder_wasm_backend(self): |
| 733 | + def test_embuilder(self): |
733 | 734 | restore_and_set_up()
|
734 |
| - # the --lto flag makes us build wasm-bc |
| 735 | + # the --lto flag makes us build LTO libraries |
735 | 736 | self.clear_cache()
|
736 | 737 | self.run_process([EMBUILDER, 'build', 'libemmalloc'])
|
737 | 738 | self.assertExists(os.path.join(config.CACHE, 'sysroot', 'lib', 'wasm32-emscripten'))
|
738 | 739 | self.clear_cache()
|
739 | 740 | self.run_process([EMBUILDER, 'build', 'libemmalloc', '--lto'])
|
740 | 741 | self.assertExists(os.path.join(config.CACHE, 'sysroot', 'lib', 'wasm32-emscripten', 'lto'))
|
741 | 742 |
|
| 743 | + def test_embuilder_wildcards(self): |
| 744 | + restore_and_set_up() |
| 745 | + glob_match = os.path.join(config.CACHE, 'sysroot', 'lib', 'wasm32-emscripten', 'libwebgpu*.a') |
| 746 | + self.run_process([EMBUILDER, 'clear', 'libwebgpu*']) |
| 747 | + self.assertFalse(glob.glob(glob_match)) |
| 748 | + self.run_process([EMBUILDER, 'build', 'libwebgpu*']) |
| 749 | + self.assertGreater(len(glob.glob(glob_match)), 3) |
| 750 | + |
742 | 751 | def test_binaryen_version(self):
|
743 | 752 | restore_and_set_up()
|
744 | 753 | with open(EM_CONFIG, 'a') as f:
|
|
0 commit comments