Commit Graph

35 Commits

Author SHA1 Message Date
Jon Turney fd47ef3a27 Use '.exe' extension for executables for Cygwin
Use '.exe' extension for executables for Cygwin when building and installing
2017-04-06 22:47:15 +01:00
Jon Turney 5af98a5ee8 Use correct shared library naming for Cygwin
Use correct shared library naming for Cygwin when building and installing
2017-04-06 22:47:15 +01:00
Nirbheek Chauhan f4f9272e87 project tests: Don't look for PDB files on MinGW/GCC 2017-03-28 14:47:55 +05:30
Nirbheek Chauhan 52e1b0a3c9 project tests: DummyExecutor for MSYS2 and OpenBSD
Added and tested on MSYS2/MinGW which doesn't implement the required
semaphore locks in the multiprocessing module:

Traceback (most recent call last):
  File "C:/msys64/mingw64/lib/python3.5\multiprocessing\synchronize.py", line 29, in <module>
    from _multiprocessing import SemLock, sem_unlink
ImportError: cannot import name 'sem_unlink'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "run_project_tests.py", line 560, in <module>
    (passing_tests, failing_tests, skipped_tests) = run_tests(all_tests, 'meson-test-run', options.extra_args)
  File "run_project_tests.py", line 406, in run_tests
    executor = conc.ProcessPoolExecutor(max_workers=num_workers)
  File "F:/msys64/mingw64/lib/python3.5\concurrent\futures\process.py", line 390, in __init__
    EXTRA_QUEUED_CALLS)
  File "F:/msys64/mingw64/lib/python3.5\multiprocessing\context.py", line 101, in Queue
    return Queue(maxsize, ctx=self.get_context())
  File "F:/msys64/mingw64/lib/python3.5\multiprocessing\queues.py", line 42, in __init__
    self._rlock = ctx.Lock()
  File "F:/msys64/mingw64/lib/python3.5\multiprocessing\context.py", line 65, in Lock
    from .synchronize import Lock
  File "F:/msys64/mingw64/lib/python3.5\multiprocessing\synchronize.py", line 34, in <module>
    " function, see issue 3770.")
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

See also:
https://bugs.python.org/issue3770
https://github.com/mesonbuild/meson/issues/1323

According to 3770, the same problem also exists on OpenBSD, so this
will potentially also be useful there.
2017-03-28 14:47:55 +05:30
Nirbheek Chauhan 665dd78ffe project tests: Print meson log instead of stdout for configure failures 2017-03-14 12:30:06 +05:30
Nirbheek Chauhan 2340fd3d8a tests/windows: Tests for #1444
Check that pdb files are installed
2017-03-03 15:52:31 +05:30
Nirbheek Chauhan 2e30912447 vs: Fix running of tests to use mesontest.py
Back in November when this broke, we didn't notice because our tests
are run in-process, so we don't check that `msbuild RUN_TESTS.vcxproj`
and `ninja test` actually work.

Now we do.
2017-01-28 01:05:21 +05:30
Jussi Pakkanen 0a2daf84eb No longer require a binary called python3 on Windows. The default name is "python". 2017-01-23 21:02:04 +02:00
Mike Sinkovsky 969be1f679 cleanup: Remove redundant parentheses 2017-01-18 21:22:47 +02:00
Mike Sinkovsky 0dd1e33898 style: [E251] unexpected spaces around keyword / parameter equals 2017-01-11 12:33:27 -05:00
Mike Sinkovsky 84902cb93a style: [E301] expected 1 blank line, found 0 2017-01-11 12:33:27 -05:00
Nirbheek Chauhan 747d4f2b03 We only need Ninja 1.5.x for the core code
This change helps us run on older distros such as Ubuntu LTS which is
very lazy in updating even non-core and stable packages such as Ninja.

Ninja 1.6.x is only needed for running the tests.
2017-01-09 14:03:03 -05:00
Nirbheek Chauhan a99732aaf2 Project tests: Also catch ValueError
It seems on Windows, deleting in a loop can cause a race where the
following error is raised:

Traceback (most recent call last):
  File "run_project_tests.py", line 550, in <module>
    (passing_tests, failing_tests, skipped_tests) = run_tests(all_tests, 'meson-test-run', options.extra_args)
  File "run_project_tests.py", line 416, in run_tests
    result = result.result()
  File "C:\python34-x64\lib\concurrent\futures\_base.py", line 402, in result
    return self.__get_result()
  File "C:\python34-x64\lib\concurrent\futures\_base.py", line 354, in __get_result
    raise self._exception
ValueError: I/O operation on closed file.

https://ci.appveyor.com/project/jpakkane/meson/build/1.0.1559/job/vsek754eu000kg3e
2017-01-04 00:42:06 +05:30
Nirbheek Chauhan 89ea236b02 project tests: Always print the logs of failing tests
There is never any reason to not do this since this script is supposed
to be run by developers and testers who are concerned with the details
of the problems.

It also helps with intermittent or hard-to-reproduce errors.
2017-01-02 17:18:07 -05:00
Jussi Pakkanen dc70916ca4 Catch permissionerrors too, since Windows seems to produce them occasionally. 2017-01-02 17:17:40 -05:00
Igor Gnatenko 116da33cdd style: fix E128 violations
E128: continuation line under-indented for visual indent

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko ea570bcb67 style: fix E265 violations
E265: block comment should start with '# '

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 2017d8578a style: fix E226 violations
E226: missing whitespace around arithmetic operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Jussi Pakkanen b55235dfbd Fix space before :. 2016-12-31 16:28:15 +02:00
Nirbheek Chauhan a3c02262f9 Force a Ninja regeneration before each project test
We have no test coverage for regeneration at all, which is why issues
like #1246 slide by without us noticing. With this, we will run a regen
on every test during `ninja test` after it has been compiled. This will
not affect test times too much since the regen will not rebuild anything
at all since there have been no source changes.
2016-12-23 19:07:45 +02:00
Jussi Pakkanen a2528a8816 Merge pull request #1233 from mesonbuild/wip/ignatenko/code-style
Trivial cleanups in code
2016-12-21 00:09:44 +02:00
Jussi Pakkanen 701e393261 Make cross tests use same framework as regular tests. 2016-12-20 20:35:29 +02:00
Igor Gnatenko 9ffc0d2f89 tree-wide: remove blank lines at EOF
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-19 18:34:06 +01:00
Igor Gnatenko 1590e185f4 run_project_test: don't import sys twice
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-19 18:33:58 +01:00
Nirbheek Chauhan c854ae1801 run_project_tests.py: Also do ninja clean on tests
This will catch things like #1220
2016-12-19 20:52:14 +05:30
Jussi Pakkanen 4d2a2802b5 Pass --no-rebuild arg when running inprocess to prevent Ninja vomit. 2016-12-04 00:03:30 +02:00
Jussi Pakkanen ed33e64c71 Guard against cpu_count failing. 2016-12-02 22:40:54 +02:00
Jussi Pakkanen c7ddce163f All testing is now in mesontest.py, which simplifies a lot of stuff. 2016-11-18 22:10:22 +02:00
Jussi Pakkanen dc10945ad7 Merge pull request #995 from centricular/more-appveyor-builds
appveyor.yml: Test more than just MSVC2010 + Ninja on x86
2016-11-09 15:00:46 -05:00
Jussi Pakkanen 5603f90287 Allow tests to mark themselves as skipped during runtime. 2016-11-09 15:00:28 -05:00
Nirbheek Chauhan a90af371f6 project tests: Fix appveyor overwriting the platform env variable
There is no way to do this in the .appveyor.yml file since it seems that
the appveyor environment is forcibly written after each cmd command that
is run.
2016-11-10 00:40:16 +05:30
Nirbheek Chauhan da782c62df project tests: Skip lang-specific tests based on backend
XCode and Visual Studio are likely never going to support these
languages, so don't fail if the compiler happens to be in the PATH.
2016-11-10 00:40:16 +05:30
Nirbheek Chauhan 377fe51003 project tests: Require both javac and java for Java tests 2016-11-09 02:38:10 +05:30
Nirbheek Chauhan b08c8c7b77 run_tests.py: Add support for tests that fail at build-time or test-time 2016-10-14 19:13:21 +05:30
Jussi Pakkanen c7936f6819 Run unittests. 2016-10-08 07:44:19 -04:00