Commit Graph

246 Commits

Author SHA1 Message Date
Mark VanderVoord
3ba2bb9b27 Merge pull request #790 from rsmyth-ecmi/shebangFix
Fix up shebangs in the auto directory
2025-07-10 13:52:27 -04:00
Ross Smyth
e4942f1a21 Fix up shebangs in the auto directory 2025-06-25 14:42:53 -04:00
James Raphael Tiovalen
b0bcdb56c1 Add support for randomizing test execution order
This commit reintroduces the option to shuffle the test execution order
into the test runner. This has been tested with the temp_sensor example
project in Ceedling. Unit tests have also been successfully executed.

Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com>
2025-03-11 00:10:05 +08:00
Mark VanderVoord
1a29024cc7 It's a New Year 2025-01-01 11:46:30 -05:00
Mark VanderVoord
c546414657 - Protect against people not defining UNITY_USE_COMMAND)LINES_ARGS but enabling cmd_lines in test runner generator. (Cherry-pick PR 739)
- Fix UNITY_NORETURN usage (Cherry-pick PR 742)
- Other standards and formatting tweaks.
2024-08-01 16:01:09 -04:00
Mark VanderVoord
18fb33921f add strict match option as '-n' again.
fix style while I'm at it.
2024-06-12 22:59:08 -04:00
andre-lei
35229fda30 Merge branch 'ThrowTheSwitch:master' into dev/gen-testrunner-use-begin-end-macro 2024-05-03 10:55:46 -07:00
sdimovv
0ace9d8273 Cast line_num to allow compilation with -WConversion 2024-04-07 02:57:16 +01:00
andre-lei
c3a3843f4c Merge branch 'ThrowTheSwitch:master' into dev/gen-testrunner-use-begin-end-macro 2024-03-20 16:00:13 -07:00
Fredrik Ellertsen
f1d953a651 Fix shebang placement
671f8d2 introduced a license header to auto/extract_version.py before the
shebang, causing builds to fail like this:
  ../subprojects/unity/meson.build:7:0: ERROR: Failed running '/path/to/extract_version.py', binary or interpreter not executable.
2024-03-20 12:47:02 +01:00
Mark VanderVoord
671f8d25f1 Update all the boilerplates 2024-03-16 23:15:00 -04:00
andre-lei
ef7f968331 Merge branch 'ThrowTheSwitch:master' into dev/gen-testrunner-use-begin-end-macro 2024-02-21 10:28:28 -08:00
Mark VanderVoord
64939db64e generate test runner: clean injected defines so the ifndef doesn't use the assignment when it exists. 2024-01-19 11:44:48 -05:00
Lei, Andre
3911b01d81 Update generate test runner to leverage custom UNITY_END() 2023-11-16 19:40:45 +00:00
Mark VanderVoord
3f7564ea3b Catch up on Ruby style and formatting changes. 2023-11-12 19:07:32 -05:00
Mark VanderVoord
bd32847abf Merge branch 'master' into platform_matrix 2023-11-08 00:16:40 -05:00
Mark VanderVoord
88069f045c Fix docs issues.
Update scripts to match latest rubocop.
Fix hex length of unity printf feature.
2023-11-07 23:48:48 -05:00
Mark VanderVoord
f9c4038341 Merge pull request #690 from ThrowTheSwitch/feature/updated-build-directives
Add/update build directives
2023-08-16 10:15:59 -04:00
Mike Karlesky
5109be3881 Missed renames of TEST_FILE() directive 2023-08-15 21:16:02 -04:00
Jon Hanghøj Henneberg
d593817630 Add TEST_MATIX option for parameterization
Added matrix option for parameterization that generates cases based on
the product of the given arguments.
2023-07-13 22:39:58 +02:00
Jon Hanghøj Henneberg
6a8e03b5a9 Fix filename sanitization with command line option
When enabling the command line option the file name added to the runner
did not escape the slashes on windows in the same way other paths where
sanitized. Copied the sanitization from the other filename uses.
2023-04-17 18:23:20 +02:00
Mark VanderVoord
a7639eeb54 Bump rubocop up to newer ruby versions (in progress) 2023-02-16 16:40:23 -05:00
Andrew McNulty
44bc9e6dbe Update Meson build system
The following features from the CMake build have been implemented:
 * Library version retrieved from unity.h.
 * Extension support.
 * Library, header, and package configuration file installation.

This commit is entirely based on existing work by Owen Torres.
2023-02-13 17:22:52 +01:00
Mark VanderVoord
cd354d9458 Merge branch 'master' into platform_matrix 2023-02-06 15:32:39 -05:00
Mark VanderVoord
5204c1bacf Merge pull request #550 from jannisbaudisch/fix_test_parameterization_regex
Improve regex for test parameterization to support function pointers
2023-02-06 15:31:49 -05:00
Mark VanderVoord
36259d46b6 Merge PR #545 2023-02-06 15:15:43 -05:00
Mark VanderVoord
5e4c587ff5 Merge branch 'master' into platform_matrix 2023-02-06 15:03:04 -05:00
Mark VanderVoord
ae4ab78c47 Merge pull request #551 from pmembrey/add-meson-generator-for-test-runner
Enhance meson support so that it can automatically generate a test runner
2023-02-06 14:56:17 -05:00
Mark VanderVoord
278b8dd3e2 Pull in PR #553.
Bump release.
2023-02-06 14:49:29 -05:00
Mark VanderVoord
67ca5c57c9 Merge pull request #556 from erijo/test-range-exclusive-end
Add support for TEST_RANGE with exclusive end
2022-11-12 20:46:33 -05:00
Mark VanderVoord
303e6ec81a Merge pull request #594 from LeoSebal/dev/python_JUnit_fix
Fixes and features on the JUnit Python conversion script
2022-11-12 20:42:55 -05:00
Mark VanderVoord
7e332fb9a9 Merge pull request #598 from AJIOB/parse_output_color_support
Parse output color & time support with custom test suite name
2022-11-12 20:42:07 -05:00
Erik Flodin
563786f97c Add support for TEST_RANGE with exclusive end
If the range is <start, end, step> instead of [start, end, step], the
end value will not be included in the range.

This can be useful if you have a define that defines e.g. the size of
something and you want to use this define as the end value. As the
pre-processor doesn't evalutate expressions (unless you do some macro
magic) you can't specify the range as [0, MY_SIZE - 1, 1]. With this
change you can then instead give the range <0, MY_SIZE, 1>.
2022-10-14 18:51:45 +02:00
Erik Flodin
76b7e359cc Improve handling of space in TEST_CASE/RANGE
The fix in 285bb6e282 didn't completly fix the issue.
2022-10-13 22:13:03 +02:00
Mark VanderVoord
37b61d2be2 Merge pull request #555 from erijo/test-case-space
Ignore space around parameter in TEST_CASE()
2022-10-11 16:25:05 -04:00
Mark VanderVoord
de73f1fcbf Merge pull request #554 from erijo/single-test-range
Make TEST_RANGE handle a single range
2022-10-04 21:57:38 -04:00
Martyn Jago
5dd3aa40dc Fix call to ERB.new to avoid deprecation warnings.
On later Rubies calling create_run_test() causes the generation of warnings of the following form:

warning: Passing safe_level with the 2nd argument of ERB.new is deprecated...
warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated...

This patch removes the noise.
2022-05-28 12:35:22 +01:00
Martyn Jago
b44c2dd095 Fix broken YAML parsing on later Rubies with Psych >=4.0
YAML.load is now interpreted as YAML.safe_load, which breaks where the
YAML file contains aliases. If we can assume our yaml files are
trusted (since this a development tool), we can check for the presence
of YAML.unsafe_load and use it instead if it exists.
2022-05-27 15:08:11 +01:00
Alex Overchenko
824eb5f5c5 Fixing Rubocop code style 2022-02-28 16:59:52 +03:00
Alex Overchenko
2dbfd0594c Adding time feature description 2022-02-28 16:11:32 +03:00
Alex Overchenko
42503b3343 unity_to_junit.py can be imported as Python module now 2022-02-28 14:12:57 +03:00
Alex Overchenko
32608af4f5 Test passing time will be in seconds now
(for xml output)

(cherry picked from commit 39d54e2913b0c3a18106a13705fed2fb8ab7f4b0)
2022-02-28 14:06:59 +03:00
Alex Overchenko
edf6a52bfd Test time parsing was added
(cherry picked from commit f2fe9fd4ad78c574af08afaa91d402b37464b131)
2022-02-28 14:06:53 +03:00
6arms1leg
72f30d82e4 Add missing volatile type qualifier
... to fix "clobbered variable" compiler warning (`-Wclobbered`).
2022-02-21 14:10:10 +01:00
Alex Overchenko
cc36e0d82b Fix failed & ignored tests color parsing 2022-02-16 15:18:38 +03:00
Alex Overchenko
5089be60e0 parse_output accepting all symbols now
Methods with their args can contain colons (':') now
2022-02-16 15:18:38 +03:00
Alex Overchenko
e32809c529 Trying to fix errors of non-ASCII characters while parsing 2022-02-16 15:18:38 +03:00
Alex Overchenko
474d201800 parse_output: test names can contain double-quoted string now 2022-02-16 15:18:38 +03:00
Alex Overchenko
10d593d413 parse_output test_suite tag can be passed as arg now 2022-02-16 15:18:38 +03:00
Alex Overchenko
2b725883f7 parse_output should parse color output now 2022-02-16 15:18:38 +03:00