diff options
-rw-r--r-- | .travis.yml | 12 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | mesonbuild/compilers.py | 2 | ||||
-rw-r--r-- | mesonbuild/interpreter.py | 1 | ||||
-rw-r--r-- | mesonbuild/modules/i18n.py | 3 | ||||
-rw-r--r-- | mesonbuild/scripts/gettext.py | 6 | ||||
-rwxr-xr-x | run_tests.py | 8 |
7 files changed, 29 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..01d8eb5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +sudo: required + +language: c + +services: + - docker + +before_install: + - docker pull jpakkane/mesonci:xenial + +script: + - docker run jpakkane/mesonci:xenial /bin/sh -c "cd /root && git clone https://github.com/mesonbuild/meson.git && cd meson && ./run_tests.py" @@ -4,6 +4,11 @@ MesonĀ® is a project to create the best possible next-generation build system. +####Build status + +<a href="https://travis-ci.org/mesonbuild/meson"><img +src="https://travis-ci.org/mesonbuild/meson.svg?branch=master"></a> + ####Dependencies - [Python](http://python.org) (version 3.4 or newer) diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 458a579..1fc936a 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -445,7 +445,7 @@ class CCompiler(Compiler): ofile.close() # Compile sanity check cmdlist = self.exelist + extra_flags + [source_name] + self.get_output_args(binary_name) - pc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + pc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=work_dir) (stdo, stde) = pc.communicate() stdo = stdo.decode() stde = stde.decode() diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index f269c2f..bf11439 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1052,7 +1052,6 @@ class Interpreter(): raise InterpreterException('Tried to create target %s which already exists.' % v.name) self.build.targets[v.name] = v elif isinstance(v, build.InstallScript): - print('x') self.build.install_scripts.append(v) elif isinstance(v, build.Data): self.build.data.append(v) diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 51668cb..4b529c7 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -24,7 +24,8 @@ class I18nModule: languages = mesonlib.stringlistify(kwargs.get('languages', [])) if len(languages) == 0: raise coredata.MesonException('List of languages empty.') - potargs = [state.environment.get_build_command(), '--internal', 'gettext', 'pot', packagename] + extra_args = mesonlib.stringlistify(kwargs.get('args', [])) + potargs = [state.environment.get_build_command(), '--internal', 'gettext', 'pot', packagename] + extra_args pottarget = build.RunTarget(packagename + '-pot', sys.executable, potargs, state.subdir) gmoargs = [state.environment.get_build_command(), '--internal', 'gettext', 'gen_gmo'] + languages gmotarget = build.RunTarget(packagename + '-gmo', sys.executable, gmoargs, state.subdir) diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py index adc4483..d8b2a9c 100644 --- a/mesonbuild/scripts/gettext.py +++ b/mesonbuild/scripts/gettext.py @@ -16,11 +16,11 @@ import os, subprocess, shutil -def run_potgen(src_sub, pkgname, langs): +def run_potgen(src_sub, pkgname, args): listfile = os.path.join(src_sub, 'POTFILES') ofile = os.path.join(src_sub, pkgname + '.pot') - return subprocess.call(['xgettext', '--package-name=' + pkgname, '-p', src_sub, listfile, - '-D', os.environ['MESON_SOURCE_ROOT'], '-k_', '-o', ofile]) + return subprocess.call(['xgettext', '--package-name=' + pkgname, '-p', src_sub, '-f', listfile, + '-D', os.environ['MESON_SOURCE_ROOT'], '-k_', '-o', ofile] + args) def gen_gmo(src_sub, bld_sub, langs): for l in langs: diff --git a/run_tests.py b/run_tests.py index ad2450e..1317380 100755 --- a/run_tests.py +++ b/run_tests.py @@ -157,7 +157,7 @@ def validate_install(srcdir, installdir): return '' def log_text_file(logfile, testdir, stdo, stde): - global stop + global stop, executor, futures logfile.write('%s\nstdout\n\n---\n' % testdir) logfile.write(stdo) logfile.write('\n\n---\n\nstderr\n\n---\n') @@ -167,6 +167,10 @@ def log_text_file(logfile, testdir, stdo, stde): print(stdo) print(stde, file=sys.stderr) if stop: + print("Aborting..") + for f in futures: + f[2].cancel() + executor.shutdown() raise StopException() def run_configure_inprocess(commandlist): @@ -300,7 +304,7 @@ def detect_tests_to_run(): return all_tests def run_tests(extra_args): - global passing_tests, failing_tests, stop + global passing_tests, failing_tests, stop, executor, futures all_tests = detect_tests_to_run() logfile = open('meson-test-run.txt', 'w', encoding="utf_8") junit_root = ET.Element('testsuites') |