210 Commits

Author SHA1 Message Date
Raphaël AMIARD
f2c6d30415 RA22-015: Rework unparsing annotations 2020-06-30 15:43:53 +02:00
Pierre-Marie de Rodat
21ce84653d Add the infrastructure to use node definitions from Lkt units
This leaves an unimplemented "langkit.lkt_lowering.create_nodes"
function and a "nodes_from_lkt" switch that tests can use to enable the
import of node definitions (nodes, fields, env specs, properties) from
Lkt files rather than from the Python DSL. Once the transition to Lkt is
over, this switch will disappear.

TN: RA22-015
2020-06-11 14:37:13 +02:00
Pierre-Marie de Rodat
cfd80a7acf Reorganize testsuite scripts
In particular, rename "testsuite_support" to "drivers". This will make
it much more comfortable for developpers to use tab-completion in
shells, as there will no longer be a conflict between
"testsuite_support" and "tests" directories.

TN: T511-017
2020-05-29 15:42:27 +02:00
Pierre-Marie de Rodat
2b9b33d6a0 Remove __future__ imports and adjust stylechecks
TN: T511-017
2020-05-26 12:33:48 +02:00
Pierre-Marie de Rodat
0d9ef993b8 Testsuite: define LKT_PATH in drivers rather than in testcases
Unlike what happens on Linux, it seems that on Windows, modifying
`os.environ` in the Python interpreter has no effect on the environment
variables seen in the same process by Ada code. As a consequence, in
order for Liblktlang to have access to the desired LKT_PATH environment
variable, define it in the test drivers so that test processes inherit
it and so that Liblktlang has always access to it.

TN: RA22-015
2020-03-16 19:12:16 +01:00
Pierre-Marie de Rodat
1455ee51fb Lkt: use the native OS path separator for LKT_PATH
Unconditionally using ":" does not work on Windows, as all absolute
directory names contain it (C:\foo\bar).

TN: RA22-015
2020-03-16 19:12:16 +01:00
Pierre-Marie de Rodat
dcffaba4a4 Add support for LKT lexers, transition tests
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
8f9232f99e Regenerate lexer_example.lkt
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
de58c96d16 Testsuite: factorize common lexers in the concrete syntax
TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
d366fbfd30 Make concrete syntax unparsing tunable
In particular, make it possible to emit (or not) lexers, grammars and
node definitions to multiple files, and to emit import statements.

TN: RA22-015
2020-03-16 10:41:18 +01:00
Pierre-Marie de Rodat
383670d486 Extend support for LKT grammars, transition tests
TN: RA22-015
2020-02-27 13:43:20 +01:00
Pierre-Marie de Rodat
5416661fba Start translating LKT grammar rules to internal parsers
TN: RA22-015
2020-02-26 12:09:38 +01:00
Pierre-Marie de Rodat
3237629d7d dsl_unparse: fix grammar name computation
Also use "Foo" as the short name for example libraries in testcases.

TN: RA22-015
2020-02-26 12:09:38 +01:00
Pierre-Marie de Rodat
71ec576e98 Testsuite: make it possible to dump concrete syntax without compiling
TN: T102-018
2020-01-22 18:01:19 +01:00
Raphaël AMIARD
7df5e34f8c RA22-015: unparse CS in build_and_run based tests 2020-01-09 16:23:29 +01:00
Raphaël AMIARD
0fca8d5d30 Minor: fix formatting 2020-01-07 21:04:29 +01:00
Raphaël AMIARD
a87984890d Minor: fix typo 2020-01-07 21:04:29 +01:00
Raphaël AMIARD
e90ffcc77d T102-023: Add an option to do property logging on stdout
Because this is useful for tests that are written in Python and cannot
activate traces yet.
2020-01-07 21:04:29 +01:00
Raphaël AMIARD
b4c50ac61a T102-022: migrate extract_sloc to a blacklist mechanism 2020-01-03 14:53:13 +01:00
Pierre-Marie de Rodat
d95eed1781 Rework the layout of obj/lib build subdirectories
This turns the build directory layout for object and library files from:

  * lib/$NAME.$LIBRARY_TYPE/
  * obj/$NAME.$LIBRARY_TYPE/

to:

  * lib/$NAME/$LIBRARY_TYPE/$BUILD_MODE
  * obj/$NAME/$LIBRARY_TYPE/$BUILD_MODE

The new layout allows one to have dev and prod builds coexisting in the
same build directory. As a side effect, libmanage's setenv and install
commands now accept the --build-mode option, so that they can work with
the build artifacts from the intended build mode.

TN: SA30-026
2019-11-04 15:49:09 +01:00
Pierre-Marie de Rodat
7e546fcbf2 Run OCaml tests under Valgrind
TN: S828-009
2019-10-18 13:14:38 +02:00
Daniel Mercier
fca2acbee6 Build and run OCaml programs separately
TN: S828-009
2019-10-09 16:52:28 +02:00
Pierre-Marie de Rodat
9ec0455913 Testsuite: make emit_and_print_errors return the compile context
TN: S917-027
2019-09-18 16:01:32 +02:00
Pierre-Marie de Rodat
693484ffd7 When possible, disable Ada API generation in testcases
This improves the time it takes to run most testcases.

TN: S823-010
2019-09-05 14:44:22 +02:00
Pierre-Marie de Rodat
1010bd2850 Use a single Langkit_Support build in the testsuite
To speed up testsuite runs, do not rebuild Langkit_Support each time we
compile a language specification in testcases. For this, we turn
the hardcoded langkit_support.gpr project file into a library project.
To speed things up even more, use a single object directory and build
all library types with -fPIC so that units are built only once. All
code that is run in testcases is already built with -fPIC anyway.

TN: S311-015
2019-09-05 14:44:22 +02:00