Skip to content

Commit 2259a3c

Browse files
1.1.4 to 1.1.5
1 parent 37b4827 commit 2259a3c

File tree

3 files changed

+103
-46
lines changed

3 files changed

+103
-46
lines changed

README.md

Lines changed: 80 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To integrate Fossil Test into your project, follow these steps:
5252
# ======================
5353
[wrap-git]
5454
url = https://github.com/fossillogic/fossil-test.git
55-
revision = v1.1.4
55+
revision = v1.1.5
5656

5757
[provide]
5858
fossil-test = fossil_test_dep
@@ -74,31 +74,85 @@ The Fossil Test CLI provides an efficient way to run and manage tests directly f
7474

7575
### Commands and Options
7676

77-
| Command | Description |
78-
|----------------------------------|-----------------------------------------------------------------------------------------------|
79-
| `--version` | Displays the current version of Fossil Test. |
80-
| `--help` | Shows help message with usage instructions. |
81-
| `--info` | Displays detailed information about the test run. |
82-
| `reverse [enable/disable]` | Enables or disables reverse order of test execution. |
83-
| `repeat=<number>` | Repeats the test suite a specified number of times. |
84-
| `shuffle [enable/disable]` | Enables or disables shuffling of test execution order. |
85-
86-
### Example Usage
87-
88-
- Display the version:
89-
```sh
90-
fossil_cli --version
91-
```
92-
93-
- Enable reverse order of test execution:
94-
```sh
95-
fossil_cli reverse enable
96-
```
97-
98-
- Repeat the test suite 5 times:
99-
```sh
100-
fossil_cli repeat=5
101-
```
77+
| Command | Description | Notes |
78+
|----------------------------------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
79+
| `--version` | Displays the current version of Fossil Test. | Useful for verifying the version of the tool in use. |
80+
| `--help` | Shows help message with usage instructions. | Provides a quick reference for all available commands. |
81+
| `--info` | Displays detailed information about the test run. | Includes information such as test count, duration, and configuration. |
82+
| `reverse [enable/disable]` | Enables or disables reverse order of test execution. | Useful for debugging or ensuring the tests don't depend on execution order. |
83+
| `shuffle [enable/disable]` | Enables or disables shuffling of test execution order. | Helps identify order-dependent issues in the test suite. |
84+
| `dry-run [enable/disable]` | Enables or disables dry run mode, showing which tests will execute without running them. | Ideal for verifying test selection criteria before actual execution. |
85+
| `repeat=<number>` | Repeats the test suite a specified number of times. | Handy for stress-testing or reproducing intermittent failures. |
86+
87+
### Key Notes Summary:
88+
- **Version**: Quickly check the installed version of Fossil Test.
89+
- **Help**: Access usage instructions and command references.
90+
- **Info**: Get detailed insights about the test run, including test count and duration.
91+
- **Reverse and Shuffle**: Help debug issues by manipulating test execution order.
92+
- **Repeat**: Ideal for reliability testing by repeatedly executing tests.
93+
- **Dry Run**: Provides a preview of the test plan without running the tests, useful for preparation and validation.
94+
95+
### Usage
96+
97+
To use the Fossil Test CLI, navigate to your project directory and run the desired command. For example, to check the version of Fossil Test, use:
98+
99+
```sh
100+
fossil-test --version
101+
```
102+
103+
To display help information, use:
104+
105+
```sh
106+
fossil-test --help
107+
```
108+
109+
For detailed information about the test run, use:
110+
111+
```sh
112+
fossil-test --info
113+
```
114+
115+
To enable reverse order of test execution, use:
116+
117+
```sh
118+
fossil-test reverse enable
119+
```
120+
121+
To disable reverse order of test execution, use:
122+
123+
```sh
124+
fossil-test reverse disable
125+
```
126+
127+
To enable shuffling of test execution order, use:
128+
129+
```sh
130+
fossil-test shuffle enable
131+
```
132+
133+
To disable shuffling of test execution order, use:
134+
135+
```sh
136+
fossil-test shuffle disable
137+
```
138+
139+
To perform a dry run, use:
140+
141+
```sh
142+
fossil-test dry-run enable
143+
```
144+
145+
To disable dry run mode, use:
146+
147+
```sh
148+
fossil-test dry-run disable
149+
```
150+
151+
To repeat the test suite a specified number of times, use:
152+
153+
```sh
154+
fossil-test repeat=<number>
155+
```
102156

103157
---
104158

code/logic/fossil/test/testing.h

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,33 +49,35 @@ extern "C" {
4949
#endif
5050

5151
/**
52-
* @struct fossil_options
53-
* @brief Structure to hold the configuration options for the test environment.
52+
* @struct fossil_options_t
53+
* @brief Structure to hold various options for fossil testing.
5454
*
55-
* This structure contains various fields to manage the configuration options for
56-
* the test environment, including flags to show version and help information, as
57-
* well as options to reverse the order of tests, repeat tests, and shuffle tests.
55+
* This structure contains various flags and parameters that control the behavior of the fossil testing framework.
5856
*
59-
* @var fossil_options::show_version
60-
* Flag to show version information.
57+
* @var fossil_options_t::show_version
58+
* Flag to indicate if the version information should be displayed.
6159
*
62-
* @var fossil_options::show_help
63-
* Flag to show help information.
60+
* @var fossil_options_t::show_help
61+
* Flag to indicate if the help information should be displayed.
6462
*
65-
* @var fossil_options::show_info
66-
* Flag to show additional information.
63+
* @var fossil_options_t::show_info
64+
* Flag to indicate if additional information should be displayed.
6765
*
68-
* @var fossil_options::reverse
69-
* Flag to reverse the order of tests.
66+
* @var fossil_options_t::reverse
67+
* Flag to indicate if the order of tests should be reversed.
7068
*
71-
* @var fossil_options::repeat_enabled
72-
* Flag to enable repeating tests.
69+
* @var fossil_options_t::repeat_enabled
70+
* Flag to indicate if test repetition is enabled.
7371
*
74-
* @var fossil_options::repeat_count
75-
* Number of times to repeat tests.
72+
* @var fossil_options_t::repeat_count
73+
* Number of times to repeat the tests if repetition is enabled.
74+
*
75+
* @var fossil_options_t::shuffle_enabled
76+
* Flag to indicate if the tests should be shuffled.
77+
*
78+
* @var fossil_options_t::dry_run
79+
* Flag to indicate if the tests should be run in dry-run mode (no actual execution).
7680
*
77-
* @var fossil_options::shuffle_enabled
78-
* Flag to enable shuffling of tests.
7981
*/
8082
typedef struct {
8183
bool show_version;
@@ -85,6 +87,7 @@ typedef struct {
8587
bool repeat_enabled;
8688
int repeat_count;
8789
bool shuffle_enabled;
90+
bool dry_run;
8891
} fossil_options_t;
8992

9093
/**

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project('Fossil Test', 'c', 'cpp',
22
meson_version: '>=1.3.0',
33
license: 'MPL-2.0',
4-
version: '1.1.4',
4+
version: '1.1.5',
55
default_options: ['c_std=c11,c18', 'cpp_std=c++20'])
66

77
subdir('code')

0 commit comments

Comments
 (0)