diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 90ebeff8d..186f77c6c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,12 +76,13 @@ jobs: libglib2.0-devel,^ libgtk3-devel,^ ninja,^ - python3-pip,^ + python35-pip,^ vala,^ zlib-devel displayName: Install Dependencies - script: | set PATH=%CYGWIN_ROOT%\bin;%SYSTEMROOT%\system32 + cp /usr/bin/python3.5 /usr/bin/python3 env.exe -- python3 run_tests.py --backend=ninja displayName: Run Tests - task: CopyFiles@2 diff --git a/ci/install-dmd.ps1 b/ci/install-dmd.ps1 index fc8226c33..aeacdf203 100644 --- a/ci/install-dmd.ps1 +++ b/ci/install-dmd.ps1 @@ -68,4 +68,4 @@ $dmd_bin = Join-Path $dmd_install "dmd2\windows\bin" $Env:Path = $Env:Path + ";" + $dmd_bin #echo "Testing DMD..." -& dmd.exe --version 2>&1>$null +& dmd.exe --version diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index e33cb7fe1..8449ea645 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2782,6 +2782,9 @@ external dependencies (including libraries) must go to "dependencies".''') progobj = self.program_from_file_for(for_machine, args, silent=silent) if progobj is None: progobj = self.program_from_system(args, silent=silent) + if progobj is None and args[0].endswith('python3'): + prog = dependencies.ExternalProgram('python3', mesonlib.python_command, silent=True) + progobj = ExternalProgramHolder(prog) if required and (progobj is None or not progobj.found()): raise InvalidArguments('Program(s) {!r} not found or not executable'.format(args)) if progobj is None: diff --git a/run_project_tests.py b/run_project_tests.py index c35928fa4..030cd51ac 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -440,6 +440,14 @@ def have_d_compiler(): elif shutil.which("gdc"): return True elif shutil.which("dmd"): + # The Windows installer sometimes produces a DMD install + # that exists but segfaults every time the compiler is run. + # Don't know why. Don't know how to fix. Skip in this case. + cp = subprocess.run(['dmd', '--version'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if cp.stdout == b'': + return False return True return False diff --git a/run_unittests.py b/run_unittests.py index ba0527dff..fbd51df79 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -5236,13 +5236,13 @@ class RewriterTests(BasePlatformTests): out = self.extract_test_data(out) self.assertDictEqual(out, {}) - def test_tatrget_add_subdir(self): + def test_target_add_subdir(self): self.prime('2 subdirs') self.rewrite(self.builddir, os.path.join(self.builddir, 'addTgt.json')) out = self.rewrite(self.builddir, os.path.join(self.builddir, 'info.json')) out = self.extract_test_data(out) expected = {'name': 'something', 'sources': ['first.c', 'second.c']} - self.assertDictEqual(list(out['target'].values())[0], expected) + self.assertDictEqual(out['target']['94b671c@@something@exe'], expected) def test_kwargs_info(self): self.prime('3 kwargs')