Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
EMBUILDER,
EMCMAKE,
EMCONFIGURE,
EMMAKE,
NON_ZERO,
PYTHON,
TEST_ROOT,
Expand Down Expand Up @@ -127,7 +128,6 @@
write_file,
)

emmake = exe_path_from_root('emmake')
emconfig = exe_path_from_root('em-config')
emsize = exe_path_from_root('emsize')
empath_split = exe_path_from_root('empath-split')
Expand Down Expand Up @@ -1149,17 +1149,17 @@ def test_pkg_config_packages(self):
('sdl', '1.2.15'),
]
for package, version in packages:
out = self.run_process([emmake, 'pkg-config', '--modversion', package], stdout=PIPE).stdout
out = self.run_process([EMMAKE, 'pkg-config', '--modversion', package], stdout=PIPE).stdout
self.assertContained(version, out)

@requires_pkg_config
@crossplatform
def test_pkg_config_ports(self):
# Use bullet here because it is part of the MINIMAL set of tasks in embuilder.
self.run_process([EMBUILDER, 'build', 'bullet'])
out = self.run_process([emmake, 'pkg-config', '--list-all'], stdout=PIPE).stdout
out = self.run_process([EMMAKE, 'pkg-config', '--list-all'], stdout=PIPE).stdout
self.assertContained('bullet', out)
out = self.run_process([emmake, 'pkg-config', '--cflags', 'bullet'], stdout=PIPE).stdout
out = self.run_process([EMMAKE, 'pkg-config', '--cflags', 'bullet'], stdout=PIPE).stdout
self.assertContained('-sUSE_BULLET', out)

@parameterized({
Expand Down Expand Up @@ -6457,11 +6457,11 @@ def check(what, args, fail=True, expect=''):
assert ('is a helper for' in output.stderr) == fail
assert ('Typical usage' in output.stderr) == fail
self.assertContained(expect, output.stdout)
check(emmake, [])
check(EMMAKE, [])
check(EMCONFIGURE, [])
check(emmake, ['--version'])
check(EMMAKE, ['--version'])
check(EMCONFIGURE, ['--version'])
check(emmake, ['make'], fail=False)
check(EMMAKE, ['make'], fail=False)
check(EMCONFIGURE, ['configure'], fail=False)
check(EMCONFIGURE, ['./configure'], fail=False)
check(EMCMAKE, ['cmake'], fail=False)
Expand All @@ -6471,7 +6471,7 @@ def check(what, args, fail=True, expect=''):
print(os.environ.get('CROSS_COMPILE'))
''')
check(EMCONFIGURE, [PYTHON, 'test.py'], expect=path_from_root('em'), fail=False)
check(emmake, [PYTHON, 'test.py'], expect=path_from_root('em'), fail=False)
check(EMMAKE, [PYTHON, 'test.py'], expect=path_from_root('em'), fail=False)

create_file('test.py', '''
import os
Expand All @@ -6488,7 +6488,7 @@ def test_emmake_python(self):
# simulates a configure/make script that looks for things like CC, AR, etc., and which we should
# not confuse by setting those vars to something containing `python X` as the script checks for
# the existence of an executable.
self.run_process([emmake, PYTHON, test_file('emmake/make.py')])
self.run_process([EMMAKE, PYTHON, test_file('emmake/make.py')])

@crossplatform
@no_windows('sdl2-config is a shell script and cannot run on windows')
Expand All @@ -6504,7 +6504,7 @@ def test_sdl2_config(self):
stdout=PIPE, stderr=PIPE).stdout
self.assertContained(expected, out)
print('via emmake')
out = self.run_process([emmake, 'sdl2-config'] + args, stdout=PIPE, stderr=PIPE).stdout
out = self.run_process([EMMAKE, 'sdl2-config'] + args, stdout=PIPE, stderr=PIPE).stdout
self.assertContained(expected, out)

def test_module_onexit(self):
Expand Down