Skip to content
Draft
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
7 changes: 7 additions & 0 deletions crates/xtask/src/tmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,11 @@ pub(crate) fn update_integration() -> Result<()> {
continue;
};

if stem != "testing-ex" {
println!("SKIPPING: {stem}");
continue
}
Comment on lines +782 to +785
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This block of code hardcodes the test execution to only run for testing-ex. This appears to be for debugging and should be removed before merging to allow all tests to be processed.


let content =
std::fs::read_to_string(&path).with_context(|| format!("Reading {}", filename))?;

Expand Down Expand Up @@ -814,6 +819,8 @@ pub(crate) fn update_integration() -> Result<()> {

let test_command = format!("{} {}", extension, relative_path.display());

println!("test_command: {test_command}");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This println! statement appears to be for debugging. Please remove it before merging.


// Check if test wants bind storage
let try_bind_storage = metadata
.extra
Expand Down
6 changes: 4 additions & 2 deletions crates/xtask/src/xtask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//! by the user - add commands here which otherwise might
//! end up as a lot of nontrivial bash code.

#![allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The crate-level #![allow(dead_code)] should be removed. While useful during development, it can hide real issues with unused code. If specific warnings need to be suppressed, it's better to apply the attribute to a more granular scope.


use std::fs::File;
use std::io::{BufRead, BufReader, BufWriter, Write};
use std::process::Command;
Expand Down Expand Up @@ -392,10 +394,10 @@ fn update_json_schemas(sh: &Shell) -> Result<()> {
#[context("Updating generated files")]
fn update_generated(sh: &Shell) -> Result<()> {
// Update man pages (create new templates + sync options)
man::update_manpages(sh)?;
// man::update_manpages(sh)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This function call appears to be commented out for testing. Please re-enable it before merging to ensure man pages are updated.

Suggested change
// man::update_manpages(sh)?;
man::update_manpages(sh)?;


// Update JSON schemas
update_json_schemas(sh)?;
// update_json_schemas(sh)?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This function call appears to be commented out for testing. Please re-enable it before merging to ensure JSON schemas are updated.

Suggested change
// update_json_schemas(sh)?;
update_json_schemas(sh)?;


// Update TMT integration.fmf
tmt::update_integration()?;
Expand Down
2 changes: 1 addition & 1 deletion docs/src/host-v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"description": "Bootloader type to determine whether system was booted via Grub or Systemd",
"oneOf": [
{
"description": "Use Grub as the booloader",
"description": "Use Grub as the bootloader",
"type": "string",
"const": "Grub"
},
Expand Down
6 changes: 6 additions & 0 deletions docs/src/man/bootc-install-print-configuration.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ filesystem type from the container image.
At the current time, the only output key is `root-fs-type` which is a
string-valued filesystem name suitable for passing to `mkfs.\$type`.

# OPTIONS

<!-- BEGIN GENERATED OPTIONS -->
**--all**

Print all configuration

Comment on lines +25 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This content has been added inside a block that appears to be auto-generated (<!-- BEGIN GENERATED OPTIONS --> ... <!-- END GENERATED OPTIONS -->). Manual edits here will likely be overwritten. If this option needs to be documented, the change should be made in the generation logic instead.

<!-- END GENERATED OPTIONS -->

# VERSION
Expand Down
93 changes: 3 additions & 90 deletions tmt/plans/integration.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -37,97 +37,10 @@ execute:
how: tmt

# BEGIN GENERATED PLANS
/plan-01-readonly:
summary: Execute booted readonly/nondestructive tests
/plan-450-testing-ex:
summary: Some random test
discover:
how: fmf
test:
- /tmt/tests/tests/test-01-readonly
extra-try_bind_storage: true

/plan-20-image-pushpull-upgrade:
summary: Execute local upgrade tests
discover:
how: fmf
test:
- /tmt/tests/tests/test-20-image-pushpull-upgrade

/plan-21-logically-bound-switch:
summary: Execute logically bound images tests for switching images
discover:
how: fmf
test:
- /tmt/tests/tests/test-21-logically-bound-switch

/plan-22-logically-bound-install:
summary: Execute logically bound images tests for installing image
discover:
how: fmf
test:
- /tmt/tests/tests/test-22-logically-bound-install

/plan-23-install-outside-container:
summary: Execute tests for installing outside of a container
discover:
how: fmf
test:
- /tmt/tests/tests/test-23-install-outside-container

/plan-23-usroverlay:
summary: Execute tests for bootc usrover
discover:
how: fmf
test:
- /tmt/tests/tests/test-23-usroverlay

/plan-24-image-upgrade-reboot:
summary: Execute local upgrade tests
discover:
how: fmf
test:
- /tmt/tests/tests/test-24-image-upgrade-reboot
extra-try_bind_storage: true

/plan-25-soft-reboot:
summary: Execute soft reboot test
discover:
how: fmf
test:
- /tmt/tests/tests/test-25-soft-reboot

/plan-26-examples-build:
summary: Test bootc examples build scripts
discover:
how: fmf
test:
- /tmt/tests/tests/test-26-examples-build
adjust:
- when: running_env != image_mode
enabled: false
because: packit tests use RPM bootc and does not install /usr/lib/bootc/initramfs-setup

/plan-27-custom-selinux-policy:
summary: Execute custom selinux policy test
discover:
how: fmf
test:
- /tmt/tests/tests/test-27-custom-selinux-policy
adjust:
- when: running_env != image_mode
enabled: false
because: these tests require features only available in image mode

/plan-28-factory-reset:
summary: Execute factory reset tests
discover:
how: fmf
test:
- /tmt/tests/tests/test-28-factory-reset

/plan-29-soft-reboot-selinux-policy:
summary: Test soft reboot with SELinux policy changes
discover:
how: fmf
test:
- /tmt/tests/tests/test-29-soft-reboot-selinux-policy
- /tmt/tests/tests/test-450-testing-ex
# END GENERATED PLANS
10 changes: 10 additions & 0 deletions tmt/tests/booted/test-testing-ex.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# number: 450
# tmt:
# summary: Some random test
# duration: 5m
#
# Verify that something works

def main[] {
echo "The test has passed"
}
Comment on lines +1 to +10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This appears to be a temporary test file created for experimentation. It should be removed before this pull request is merged to avoid adding unnecessary test code to the repository.

71 changes: 4 additions & 67 deletions tmt/tests/tests.fmf
Original file line number Diff line number Diff line change
@@ -1,70 +1,7 @@
# THIS IS GENERATED CODE - DO NOT EDIT
# Generated by: cargo xtask tmt

/test-01-readonly:
summary: Execute booted readonly/nondestructive tests
duration: 30m
test: nu booted/test-01-readonly.nu

/test-20-image-pushpull-upgrade:
summary: Execute local upgrade tests
duration: 30m
test: nu booted/test-image-pushpull-upgrade.nu

/test-21-logically-bound-switch:
summary: Execute logically bound images tests for switching images
duration: 30m
test: nu booted/test-logically-bound-switch.nu

/test-22-logically-bound-install:
summary: Execute logically bound images tests for installing image
duration: 30m
test: nu booted/test-logically-bound-install.nu

/test-23-install-outside-container:
summary: Execute tests for installing outside of a container
duration: 30m
test: nu booted/test-install-outside-container.nu

/test-23-usroverlay:
summary: Execute tests for bootc usrover
duration: 30m
test: nu booted/test-usroverlay.nu

/test-24-image-upgrade-reboot:
summary: Execute local upgrade tests
duration: 30m
test: nu booted/test-image-upgrade-reboot.nu

/test-25-soft-reboot:
summary: Execute soft reboot test
duration: 30m
test: nu booted/test-soft-reboot.nu

/test-26-examples-build:
summary: Test bootc examples build scripts
duration: 45m
adjust:
- when: running_env != image_mode
enabled: false
because: packit tests use RPM bootc and does not install /usr/lib/bootc/initramfs-setup
test: bash booted/test-26-examples-build.sh

/test-27-custom-selinux-policy:
summary: Execute custom selinux policy test
duration: 30m
adjust:
- when: running_env != image_mode
enabled: false
because: these tests require features only available in image mode
test: nu booted/test-custom-selinux-policy.nu

/test-28-factory-reset:
summary: Execute factory reset tests
duration: 30m
test: nu booted/test-factory-reset.nu

/test-29-soft-reboot-selinux-policy:
summary: Test soft reboot with SELinux policy changes
duration: 30m
test: nu booted/test-soft-reboot-selinux-policy.nu
/test-450-testing-ex:
summary: Some random test
duration: 5m
test: nu booted/test-testing-ex.nu
Loading