aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/nonative.yml19
-rwxr-xr-xrun_cross_test.py9
-rwxr-xr-xrun_tests.py6
3 files changed, 29 insertions, 5 deletions
diff --git a/.github/workflows/nonative.yml b/.github/workflows/nonative.yml
new file mode 100644
index 0000000..59386c5
--- /dev/null
+++ b/.github/workflows/nonative.yml
@@ -0,0 +1,19 @@
+name: Cross-only compilation environment
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+jobs:
+ cross-only-armhf:
+ runs-on: ubuntu-latest
+ container: mesonbuild/eoan:latest
+ steps:
+ - run: |
+ apt-get -y purge clang gcc gdc
+ apt-get -y autoremove
+ - uses: actions/checkout@v2
+ - name: Run tests
+ run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./run_tests.py $CI_ARGS --cross ubuntu-armhf.txt --cross-only'
diff --git a/run_cross_test.py b/run_cross_test.py
index 269eb01..70db667 100755
--- a/run_cross_test.py
+++ b/run_cross_test.py
@@ -25,17 +25,20 @@ from mesonbuild import mesonlib
from mesonbuild.coredata import version as meson_version
-def runtests(cross_file, failfast):
- tests = ['--only', 'common', 'native']
+def runtests(cross_file, failfast, cross_only):
+ tests = ['--only', 'common']
+ if not cross_only:
+ tests.append('native')
cmd = mesonlib.python_command + ['run_project_tests.py', '--backend', 'ninja'] + (['--failfast'] if failfast else []) + tests + ['--cross-file', cross_file]
return subprocess.call(cmd)
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--failfast', action='store_true')
+ parser.add_argument('--cross-only', action='store_true')
parser.add_argument('cross_file')
options = parser.parse_args()
- return runtests(options.cross_file, options.failfast)
+ return runtests(options.cross_file, options.failfast, options.cross_only)
if __name__ == '__main__':
print('Meson build system', meson_version, 'Cross Tests')
diff --git a/run_tests.py b/run_tests.py
index 08ad78a..b3bcee2 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -319,6 +319,7 @@ def main():
parser.add_argument('--backend', default=None, dest='backend',
choices=backendlist)
parser.add_argument('--cross', default=[], dest='cross', action='append')
+ parser.add_argument('--cross-only', action='store_true')
parser.add_argument('--failfast', action='store_true')
parser.add_argument('--no-unittests', action='store_true', default=False)
(options, _) = parser.parse_known_args()
@@ -330,7 +331,6 @@ def main():
import coverage
coverage.process_startup()
returncode = 0
- cross = options.cross
backend, _ = guess_backend(options.backend, shutil.which('msbuild'))
no_unittests = options.no_unittests
# Running on a developer machine? Be nice!
@@ -365,7 +365,7 @@ def main():
env['PYTHONPATH'] = os.pathsep.join([temp_dir, env.get('PYTHONPATH')])
else:
env['PYTHONPATH'] = temp_dir
- if not cross:
+ if not options.cross:
cmd = mesonlib.python_command + ['run_meson_command_tests.py', '-v']
if options.failfast:
cmd += ['--failfast']
@@ -395,6 +395,8 @@ def main():
cmd = cross_test_args + ['cross/' + cf]
if options.failfast:
cmd += ['--failfast']
+ if options.cross_only:
+ cmd += ['--cross-only']
returncode += subprocess.call(cmd, env=env)
if options.failfast and returncode != 0:
return returncode