mirror of
https://gitlab.com/qemu-project/meson.git
synced 2025-11-09 02:21:48 +08:00
Fix cross test and run them if a cross compiler is available.
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
[binaries]
|
||||
# we could set exe_wrapper = qemu-arm-static but to test the case
|
||||
# when cross compiled binaries can't be run we don't do that
|
||||
c = '/usr/bin/arm-linux-gnueabihf-gcc'
|
||||
cpp = '/usr/bin/arm-linux-gnueabihf-g++'
|
||||
c = '/usr/bin/arm-linux-gnueabihf-gcc-6'
|
||||
cpp = '/usr/bin/arm-linux-gnueabihf-g++-6'
|
||||
ar = '/usr/arm-linux-gnueabihf/bin/ar'
|
||||
strip = '/usr/arm-linux-gnueabihf/bin/strip'
|
||||
pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
|
||||
|
||||
@ -198,7 +198,7 @@ class TestHarness:
|
||||
duration = 0.0
|
||||
stdo = 'Not run because can not execute cross compiled binaries.'
|
||||
stde = None
|
||||
returncode = -1
|
||||
returncode = GNU_SKIP_RETURNCODE
|
||||
else:
|
||||
cmd = wrap + cmd + test.cmd_args
|
||||
starttime = time.time()
|
||||
|
||||
@ -25,7 +25,7 @@ Eventually migrate to something fancier.'''
|
||||
import os, subprocess, shutil, sys
|
||||
import mesonbuild.environment as environment
|
||||
|
||||
from run_tests import gather_tests
|
||||
from run_project_tests import gather_tests
|
||||
|
||||
test_build_dir = 'work area'
|
||||
install_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'install dir')
|
||||
|
||||
@ -23,5 +23,8 @@ if __name__ == '__main__':
|
||||
if mesonlib.is_linux():
|
||||
print('Running unittests.\n')
|
||||
returncode += subprocess.call([sys.executable, 'run_unittests.py', '-v'])
|
||||
if shutil.which('arm-linux-gnueabihf-gcc-6'): # Ubuntu packages do not have a binary without -6 suffix.
|
||||
print('Running cross compilation tests.\n')
|
||||
returncode += subprocess.call([sys.executable, 'run_cross_test.py', 'cross/ubuntu-armhf.txt'])
|
||||
returncode += subprocess.call([sys.executable, 'run_project_tests.py'] + sys.argv[1:])
|
||||
sys.exit(returncode)
|
||||
|
||||
Reference in New Issue
Block a user