Commit Graph

106 Commits

Author SHA1 Message Date
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
Pierre-Marie de Rodat
3ac8d5206b Testsuite: do not compile mains unless necessary
TN: S823-010
2019-09-05 14:44:22 +02:00
Pierre-Marie de Rodat
c538e84b2c Testsuite: automatically set up Dune projects
TN: S410-040
2019-06-27 15:02:58 +02:00
Pierre-Marie de Rodat
3b63e1e9a0 python_support/utils.py: document build_and_run's ocaml_main argument
TN: S410-040
2019-06-27 15:02:58 +02:00
Daniel Mercier
84ed349df7 Add tests for OCaml API
TN: S410-040
2019-06-27 15:02:58 +02:00