Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ciimage/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

# Install Meson and Ninja using pip
RUN python3 -m pip install --no-cache-dir meson==1.3.0 ninja==1.10.2 --break-system-packages
RUN python3 -m pip install --no-cache-dir meson==1.8.0 ninja==1.10.2 --break-system-packages

# Set environment variables
ENV CC=clang \
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/conan_ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: Conan CI

on:
schedule:
- cron: '15 21 * * *'
push:
branches:
- main
# Match branches with version numbers like 1.2.8, 2.0.0, etc.
- '[0-9]+.[0-9]+.[0-9]+'
tags:
- 'v*' # Tag releases like v1.2.8
pull_request:
branches:
- main
- '[0-9]+.[0-9]+.[0-9]+'

jobs:
build:
Expand All @@ -21,15 +26,27 @@ jobs:
with:
python-version: "3.11"

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip

- name: Cache Conan
uses: actions/cache@v3
with:
path: ~/.conan
key: ${{ runner.os }}-conan

- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install -y ninja-build pkg-config python3-pip build-essential
sudo apt update
sudo apt install -y ninja-build pkg-config python3-pip build-essential

- name: Install Meson and Conan
run: |
pip install --upgrade pip
pip install meson==1.3.2 conan==2.3.2
pip install meson==1.8.0 conan==2.3.2

- name: Detect Conan profile
run: conan profile detect
Expand All @@ -39,11 +56,11 @@ jobs:

- name: Build
run: |
meson setup builddir
meson compile -C builddir
meson setup -Dwith_test=enabled builddir
meson compile -C builddir -v

- name: Test
run: meson test -C builddir
run: meson test -C builddir -v

- name: Package
run: conan create . --name=pizza_test --version=1.2.7
run: conan create . --name=pizza_test --version=1.2.8
18 changes: 6 additions & 12 deletions .github/workflows/crossfile_ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
name: Crossfile CI

on:
schedule:
- cron: '15 21 * * *'
push:
paths:
- "**.c"
- "**.h"
- "**.py"
- "**.build"
- "**.options"
branches:
- main
pull_request:
paths:
- "**.c"
- "**.h"
- "**.py"
- "**.build"
- "**.options"
branches:
- main

jobs:
build_cross:
Expand Down
40 changes: 17 additions & 23 deletions .github/workflows/meson_ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
name: Meson CI

on:
schedule:
- cron: '15 21 * * *'
push:
paths:
- "**.c"
- "**.h"
- "**.py"
- "**.build"
- "**.options"
branches:
- main
pull_request:
paths:
- "**.c"
- "**.h"
- "**.py"
- "**.build"
- "**.options"
branches:
- main

jobs:
build_msvc:
name: Building on MSVC ${{ matrix.msvc_version }}
runs-on: windows-latest
strategy:
matrix:
msvc_version: [2015, 2017, 2019, 2022, 2025]
msvc_version: [2019, 2022, 2025]
steps:
- name: Checkout code
uses: actions/checkout@v5
Expand All @@ -39,11 +33,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install meson ninja
if ($env:msvc_version -eq "2015") {
choco install visualstudio2015buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --includeRecommended --includeOptional --passive"
} elseif ($env:msvc_version -eq "2017") {
choco install visualstudio2017buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
} elseif ($env:msvc_version -eq "2019") {
if ($env:msvc_version -eq "2019") {
choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
} elseif ($env:msvc_version -eq "2022") {
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
Expand All @@ -62,9 +52,6 @@ jobs:
build_macosx:
name: Building on macOS with Xcode ${{ matrix.xcode_version }}
runs-on: macos-latest
strategy:
matrix:
xcode_version: ["15.0", "15.1", "15.2", "15.3", "15.4"]
steps:
- name: Checkout code
uses: actions/checkout@v5
Expand All @@ -76,9 +63,16 @@ jobs:
with:
python-version: '3.12'

- name: Install Xcode Command Line Tools
run: |
if ! xcode-select -p &>/dev/null; then
sudo xcode-select --install
until xcode-select -p &>/dev/null; do sleep 5; done
fi

- name: Install Xcode
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode_version }}.app
run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

- name: Install Meson and Ninja
run: |
python -m pip install meson ninja
Expand Down
74 changes: 36 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,29 @@ Pizza Test is a smart unit testing framework developed by Fossil Logic for C and
| **Tag-Based Test Filtering** | Execute subsets of tests based on custom tags for better test suite organization and faster iteration. |
| **Detailed Performance Insights** | In-depth statistics on execution time, memory usage, and test stability to help improve code performance and reliability. |

---
## Command-Line

The Pizza Test CLI provides an efficient way to run and manage tests directly from the terminal. Here are the available commands and options:

### Commands and Options

| Command | Description | Notes |
|-----------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| `--version` | Show version information. | Useful for verifying the version of the tool in use. |
| `--dry-run` | Perform a dry run without executing commands. | Ideal for verifying test selection criteria before actual execution. |
| `--host` | Show information about the current host. | Useful for looking up the system you are running tests on. |
| `--help` | Show this help message. | Provides a quick reference for all available commands. |
| `run` | Execute tests with optional parameters. | Supports additional options like `--fail-fast` and `--repeat`. |
| `filter` | Filter tests based on criteria. | Options include filtering by test name, suite name, or tags. |
| `sort` | Sort tests by specified criteria. | Allows sorting in ascending or descending order. |
| `shuffle` | Shuffle tests with optional parameters. | Includes options for specifying a seed or shuffle criteria. |
| `show` | Show test cases with optional parameters. | Useful for listing and inspecting available test cases. |
| `color=<mode>` | Set color mode (`enable`, `disable`, `auto`). | Enhances readability in supported terminals. |
| `config=<file>` | Specify a configuration file (must be `pizza_test.ini`). | Allows loading custom settings for test execution. |
| `theme=<name>` | Set the theme (`fossil`, `catch`, `doctest`, etc.). | Customizes the appearance of test output. |
| `timeout=<seconds>` | Set the timeout for commands (default: 60 seconds). | Ensures commands do not exceed the specified duration, helping to identify long-running tests.|

Pizza Test is a first-class citizen of the **Truthful Intelligence** ecosystem, using **Jellyfish AI** as its foundation for test integrity, learning from outcomes over time, and enabling tamper-proof validation across distributed development environments.
> **Note:** In addition to the `--help` option, Pizza Test CLI supports `--help` and subcommand-specific help commands. You can use `<command> --help` (e.g., `run --help`) to display detailed usage information for any command or subcommand. This provides flexible ways to access documentation directly from the terminal.

---

Expand All @@ -29,15 +49,25 @@ Pizza Test is a first-class citizen of the **Truthful Intelligence** ecosystem,
To get started with Pizza Test, ensure you have the following installed:

- **Meson Build System**: If you don’t have Meson installed, follow the installation instructions on the official [Meson website](https://mesonbuild.com/Getting-meson.html).
- **Conan Package Manager**: If you prefer using Conan, ensure it is installed by following the instructions on the official [Conan website](https://docs.conan.io/en/latest/installation.html).

---

### Adding Pizza Test Dependency
### Adding Dependency

#### Adding via Conan GitHub repository

Conan can install packages directly from a GitHub repository if it contains a valid conanfile.py.

```bash
conan install git+https://github.com/fossillogic/fossil-test.git#v1.2.7 --name pizza_test --build=missing
```

#### Adding via Meson Build System

1. **Install Meson Build System**:
Install Meson version `1.3` or newer:
Install Meson version `1.8.0` or newer:

```bash
python -m pip install meson # To install Meson
python -m pip install --upgrade meson # To upgrade Meson
Expand All @@ -52,53 +82,21 @@ python -m pip install --upgrade meson # To upgrade Meson
# ======================
[wrap-git]
url = https://github.com/fossillogic/fossil-test.git
revision = v1.2.7
revision = v1.2.8

[provide]
fossil-test = fossil_test_dep
```

3. **Integrate the Dependency**:
In your `meson.build` file, integrate Fossil Test by adding the following line:

```meson
dep = dependency('fossil-test')
```

#### Adding via Conan GitHub repository

Conan can install packages directly from a GitHub repository if it contains a valid conanfile.py.

```bash
# Install from GitHub (replace branch/tag if needed)
conan install git+https://github.com/fossillogic/fossil-test.git#v1.2.7 --name pizza_test --build=missing
```

**Note**: For the best experience, always use the latest release of Pizza Test. Visit the [Pizza Test Releases](https://github.com/pizzalogic/pizza-test/releases) page for the latest versions.

## Pizza Test CLI Usage

The Pizza Test CLI provides an efficient way to run and manage tests directly from the terminal. Here are the available commands and options:

### Commands and Options

| Command | Description | Notes |
|-----------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| `--version` | Show version information. | Useful for verifying the version of the tool in use. |
| `--dry-run` | Perform a dry run without executing commands. | Ideal for verifying test selection criteria before actual execution. |
| `--host` | Show information about the current host. | Useful for looking up the system you are running tests on. |
| `--help` | Show this help message. | Provides a quick reference for all available commands. |
| `run` | Execute tests with optional parameters. | Supports additional options like `--fail-fast` and `--repeat`. |
| `filter` | Filter tests based on criteria. | Options include filtering by test name, suite name, or tags. |
| `sort` | Sort tests by specified criteria. | Allows sorting in ascending or descending order. |
| `shuffle` | Shuffle tests with optional parameters. | Includes options for specifying a seed or shuffle criteria. |
| `show` | Show test cases with optional parameters. | Useful for listing and inspecting available test cases. |
| `color=<mode>` | Set color mode (`enable`, `disable`, `auto`). | Enhances readability in supported terminals. |
| `config=<file>` | Specify a configuration file (must be `pizza_test.ini`). | Allows loading custom settings for test execution. |
| `theme=<name>` | Set the theme (`fossil`, `catch`, `doctest`, etc.). | Customizes the appearance of test output. |
| `timeout=<seconds>` | Set the timeout for commands (default: 60 seconds). | Ensures commands do not exceed the specified duration, helping to identify long-running tests.|

> **Note:** In addition to the `--help` option, Pizza Test CLI supports `--help` and subcommand-specific help commands. You can use `<command> --help` (e.g., `run --help`) to display detailed usage information for any command or subcommand. This provides flexible ways to access documentation directly from the terminal.

## Configure Build Options

To configure the build system with testing enabled, use the following command:
Expand Down
2 changes: 1 addition & 1 deletion code/logic/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// macro definitions
// *****************************************************************************

#define FOSSIL_PIZZA_VERSION "1.2.7"
#define FOSSIL_PIZZA_VERSION "1.2.8"
#define FOSSIL_PIZZA_AUTHOR "Fossil Logic"
#define FOSSIL_PIZZA_WEBSITE "https://fossillogic.com"

Expand Down
Loading
Loading