130 Commits

Author SHA1 Message Date
Pierre-Marie de Rodat
084c81194e Python bindings: make the version number PEP 440-compliant 2023-12-08 11:42:05 +00:00
Pierre-Marie de Rodat
27c7a4de00 Java API: bind AnalysisContext.Get_From_Provider 2023-07-31 09:28:19 +00:00
Pierre-Marie de Rodat
4f0edda8a3 Testsuite: rework "main" arguments for build_and_run
In particular, rename "ada_main" to "gpr_main" and allow it to contain
both Ada and C mains. Also remove the now useless "with_c" argument, and
the unused "mains" one as well.
2023-06-08 10:43:23 +00:00
Pierre-Marie de Rodat
55bcc4c2c2 libmanage.py: remove --no-ada-api
The actual feature behind this flag has been removed for a long time
(the generic introspection API, always generated, depends on the public
Ada API), so remove the last bits.
2023-06-08 10:34:31 +00:00
Hugo GUERRIER
8328b313cd Enable Graal C API tests on Windows
Remove the os restriction in native-image related tests and add a flag on
the testsuite to enable native-image related tests.
2023-05-26 10:02:36 +00:00
Hugo GUERRIER
d023bfa91b Add '-pedantic' to the C flags in the test project template
Adding the '-pedantic' flag allow the testsuite to raise errors on empty
structures in generated C headers.
2023-05-24 15:30:09 +02:00
Pierre-Marie de Rodat
b60d27c7cf Put the C header inside the generated project
This allows GCC, when used to build C mains, to access the C header
through command line arguments instead of through the `C_INCLUDE_PATH`
environment variable, which lets GCC emit warnings for issues found in C
headers. This will be useful to detect issues in generated code.
2023-05-22 09:17:45 +00:00
Hugo GUERRIER
be5e1bc7a7 Make Java tests use JAVA_HOME executables 2023-04-06 15:27:45 +02:00
Hugo GUERRIER
bc960b4fe4 W125-027: Change the Java version in pom.xml and add support for graalvm java executable 2023-04-06 15:27:45 +02:00
Hugo GUERRIER
cb8c1a07c1 W125-027: Make langkit strings wrap/unwrap to/from Java strings + Change decoding/encoding method 2023-04-06 15:27:45 +02:00
Hugo GUERRIER
9f042edf20 W125-027: Add the Graal C API bindings tests 2023-04-06 15:27:38 +02:00
Hugo GUERRIER
3f27ad882e W125-027 Add the Java bindings 2023-03-17 11:58:43 +01:00
Pierre-Marie de Rodat
50496d7c35 Testsuite: always generate the Ada API
In order to remove the language-specific introspection API, upcoming
changes will introduce uses of the generic API in LAL's implementation.
The generic API implementation depends on the public Ada API, so we need
to always generate the latter.

The impact on the testsuite execution time is acceptable: it goes from
1m26 before this patch to 1:37 on a beefy machine.

TN: W106-006
2023-02-28 15:07:32 +00:00
Pierre-Marie de Rodat
2379ef558f python_support/utils.py: harmonize defaults for version/build_date
Use the same default values as in CompileCtx's constructor: None. This
should get rid of these strange version numbers in the testsuite, which
may annoy Maven for the upcoming Java bindings.

TN: W125-027
2023-02-20 13:31:08 +00:00
Pierre-Marie de Rodat
83c26aa941 c_api/event_handler: new testcase
TN: VA12-016
2022-11-23 12:37:21 +00:00
Pierre-Marie de Rodat
558f53748f Testsuite: include C in test projects only optionally
In order to avoid GPR warnings ("no C sources for this project") for all
projects that contain only Ada sources, make the C language optional in
generated project files.

TN: VA14-036
2022-10-20 11:55:22 +00:00
Pierre-Marie de Rodat
3a838da876 C API: add a getter for exception names, for testing purposes
Printing the int value for the exception IDs makes test outputs
unstable, as IDs can change when new exceptions are added. Add an
exception name getter to restore stable output.

TN: VA14-036
2022-10-19 15:22:01 +00:00
Pierre-Marie de Rodat
8f220c9e25 Allow lang. specs to extend the set of exceptions properties may raise
So far, properties were allowed to raise Property_Error exceptions only:
other exceptions were considered as a low-level bug (i.e. assumed not
possible), which could corrupt the process state.

This commits allows language specs to allow additional kinds of
exceptions to be raised in property errors.

For #632
2022-07-19 09:42:07 +00:00
Pierre-Marie de Rodat
db86f7b519 Testsuite: adapt for Python 3.8+
See the rationale in path_wrapper.py's docstring.

TN: V401-020
2022-04-14 14:07:44 +00:00
Pierre-Marie de Rodat
aa0213b1a6 Add a mode to generate standalone libraries (no dep on Langkit_Support)
TN: V323-024
2022-04-05 12:43:08 +00:00
Pierre-Marie de Rodat
e61e501d1b Add a testcase to check GDB helpers
Do not run this test in the GitLab CI as the GDB that comes from Alire
does not have Python scripting support enabled.

TN: S521-024
2022-03-22 13:08:43 +00:00
Pierre-Marie de Rodat
9c24c9e0a3 Testsuite: restrict inner test parallelism
When running all tests, restrict each test to a single core, otherwise
we end up running spamming the host with N*N subprocesses despite
--jobs=N passed to the testsuite. However, keep inner parallelism to N
when running few tests, for dev convenience.
2022-03-22 10:07:34 +00:00
Pierre-Marie de Rodat
e37eed1c3f Testsuite: add a types_from_lkt argument to emit_and_print_errors
This will allow tests for DSL warnings/errors to be written in full Lkt.

For #612
2022-02-24 14:40:57 +00:00
Pierre-Marie de Rodat
72080d8b24 Testsuite: use gnat.supp for Ada mains
The previous commit for this ticket added a Valgrind suppression file
assuming that the testsuite would automatically pick it up. It is not
the case, so explicitly use gnat.supp in tests when running Ada
programs.

TN: V221-024
2022-02-23 20:11:22 +00:00
Pierre-Marie de Rodat
1345038052 CompileCtx: consider that short name has lower case
We happen to use short name only in its lower case form. Switch to the
lower case form only to avoid breaking the "one word, starting upper
case" rule (for instance with LAL for Libadalang).

TN: V126-009
2022-01-27 16:49:27 +01:00