204 Commits

Author SHA1 Message Date
Pascal Obry
23f571fb12 Fix parsing when using Null_Set.
The Null_Set has been redefined to ensure it is usable by the
templates parser internal parser.

Add corresponding regression test.

TN eng/toolchain/templates-parser#10
2026-01-08 19:27:06 +01:00
Pascal Obry
907be0c2e1 Disable tests using XML/Ada if support not found.
If TP_XMLADA is on the environment use it, this is the case when
using "make test" otherwise if testsuite.py is called directly
reads the variables from ../makefile.setup.

Fixes two recent regressions.

TN eng/toolchain/templates-parser#6
2025-01-29 17:43:15 +01:00
Pascal Obry
cbc31cd2cd New filter IS_FIRST_OCCURRENCE.
This new filter can be used to do a specific action the first time
a variable value is found. While generating code, this can be handy
to avoid generating the same declaration twice for example.

Add regression test and documentation.

Part of eng/toolchain/aws#77
2025-01-27 18:08:09 +01:00
Pascal Obry
f2067e4d0d Fix handling of macro parameters in EXTENDS & INLINE.
TN eng/toolchain/templates-parser#5
2024-12-10 18:03:21 +01:00
Pascal Obry
7bc8a2b023 Ensure that the regexp/regpat is cloned.
Fix crash reported when releasing MATCH filter in macros.

Add corresponding regression test.

Part of eng/toolchain/aws#39
2024-08-21 18:12:08 -04:00
Pascal Obry
6f4e561f23 Add START_WITH and END_WITH filter.
Add corresponding regression tests and documentation.

Motivated by eng/toolchain/aws#39
2024-08-21 18:12:08 -04:00
Pascal Obry
6f0a6ff2dd Implement '&' operator between two Translate_Set.
Add corresponding regression test.

TN: eng/toolchain/templates-parser#4
2024-01-12 08:43:18 +01:00
Pascal Obry
53f95cffde Fix handling of cursor tag of dimension 1 and length 1.
Cursor tag of dimension 1 and length 1 should be processed
as standard tag instead of being ignored.

Add corresponding regression test.

Fixes eng/toolchain/templates-parser#3
2023-12-08 17:51:22 +01:00
Pascal Obry
53cff2e1a8 Add default & alternate filters.
Add corresponding regression test and documentation.
2022-12-20 16:04:12 +01:00
Pascal Obry
2559eb7609 regtests/Makefile: Ensure PRJ_TARGET is passed.
Fix compilation error while builind and running tests.

Fixes VC15-016.
2022-12-15 20:03:23 +01:00
Pascal Obry
4284e33e3c Fix MACRO tree rewrite.
We do not want to change the tree node in if conditional. Only
the TEXT nodes' values are to be changed.

Add corresponding regression test.

Found while working on V531-036.
2022-11-23 13:06:35 +01:00
Pascal Obry
9986f5a15b Better output for the MACRO in print-tree.
Add all INLINE separators. Properly indent the END_INLINE.
2022-11-23 13:06:35 +01:00
Nicolas Boulenguez
602330f693 Optionally let Make display executed commands
Debian automatically rebuilds packages on hardware the developper
does not possess.  When investigating a failure, a verbose log may
save a lot of work: distant connexion, cloning a chroot, installing
build dependencies.
2022-11-23 12:20:43 +01:00
Victor Verbeke
f0fba60ca9 Fix tests on Windows (#55)
* Fix run command with interpreter, fix test paths

Two problems fixed:
- Bug introduced in previous merge request that would crash Run by
  giving it a bad kwarg. Reverted to self.shell, but used the
  e3.sys.interpreter to be more flexible.
- Replaced the tests naming by setting a tests_subdir instead of a
  test_name method, which would crash Windows tests.

TN: V223-017
2022-06-29 18:15:15 +02:00
Verbeke Victor
6a7d9a9ef8 Replace self.shell with Run from e3 in testsuite
Rlimit would cause crashes in Windows tests. It was used by e3.testsuite
when calling self.shell, and would result into the following error:
"rlimit: cannot spawn process (error 0x2)".

Fix this with a replacement with Run, from e3.os.process, which should
not call any bug.

TN: V223-017
2022-06-27 17:16:29 +02:00
Victor Verbeke
04cd5ae478 Merge pull request #53 from VictorVerbeke/master
Fix test name parsing for diff to work on GAIA
2022-06-20 11:58:38 +02:00
Verbeke Victor
994f4c5e80 Fix test name parsing for diff to work on GAIA
Test names were prepended with a "test__" value, making the diffs on
gaia fail, thus making the results invalid.

TN: V223-017
2022-06-17 12:20:39 +02:00
Victor Verbeke
429465913e Merge pull request #52 from VictorVerbeke/master
Translate templates_parser tests to e3.testsuite
2022-06-10 16:56:33 +02:00
Verbeke Victor
9b3e054f2c Migration from test.opt to test.yaml
Edition of test descriptions using test.yaml instead of test.opt in
order to use the standard e3.testsuite test finder.

TN: V223-017
2022-06-10 14:42:02 +02:00
Verbeke Victor
a27e6fb767 Update test suite to include latin-1 and xfails
TN: V223-017
2022-06-06 17:42:36 +02:00
Nicolas Boulenguez
b63c08dc68 Pass explicit ADA_PROJECT_PATH TP_XMLADA to tests.
Else the installed version is used.
2022-06-01 19:49:34 +02:00
Nicolas Boulenguez
7b68b41ba9 Let projects depend on specific xmlada_* instead of legacy xmlada.
The xmlada project gathers all xmlada_* library projects.  Building
templates_parser with more specific dependencies avoids an unneeded
dependency on xmlada_schema.
2022-06-01 19:43:50 +02:00
Verbeke Victor
2d160b0012 Translate templates_parser tests to e3.testsuite
Move tests from gnatpython to e3.testsuite.
Also fixed baselines that caused fails.

TN: V223-017
2022-05-11 12:23:58 +02:00
Pascal Obry
577db6467c Fix parsing of INLINE with double escaped characters.
Add corresponding regression test.

Fixes #37.
2020-06-17 20:43:18 +02:00
Pascal Obry
57fa3fa69d Handle include starting with ./ as relative to current directory.
A template file starting with ./ is now properly handled as
relative to the server current working directory.

Fixes a regression. Add corresponding regression test.

For T305-015.
2020-03-07 09:02:54 +01:00