Skip to content

Conversation

@cgwalters
Copy link
Contributor

@cgwalters cgwalters commented Jun 21, 2024

I am guessing I may be one of the first people to try using tmt
with a Rust project. The default for the cargo toolchain
is to keep a lot of cached incremental data in target/.
In my case with bootc, it's currently 20G.

A plain rsync() of this is incredibly inefficient. rsync doesn't
even use reflinks if available, though that's a distinct bug.

Use git ls-files to honor .gitignore.

Signed-off-by: Colin Walters [email protected]

@cgwalters
Copy link
Contributor Author

I don't quite understand why we need even a logical copy of the context directory at all by default. I would expect tests to just not mutate it. But, if we wanted to be more sure, we could of course try to design a flow where we run tmt in a container, with the context mounted readonly.

@martinpitt
Copy link

Big +1. In Cockpit we are actually in the same boat -- a lot of our developer trees have a ~ 1 GB node_modules/ (most of which isn't needed for running tests) and often also a multi-GB test/images/ (ephemeral VM overlays for our own tests, not at all relevant for tmt), and heaven knows what other unclean stuff in the build tree. So only copying the git-tracked files would be much appreciated. I suppose it's not that obvious though -- for tmt try and iterating you actually want to test the checkout including local and uncommitted modifications. A simple git clone wouldn't do that.

@cgwalters cgwalters changed the title base: Clone git repo if present instead of rsync base: Honor .gitignore for rsync Jun 21, 2024
Copy link

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

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

Lovely, thanks @cgwalters ! Neither my previous 👎 nor my 👍 here are authoritative of course, but this is really nice!

@LecrisUT
Copy link
Collaborator

Love the idea. Could it check for the presence of .gitignore first, and then can it be made configurable? Technically tmt should work in a non-git environment as well.

@martinpitt
Copy link

This PR doesn't change anything if the directory isn't a git tree. The question is just if anyone should rely on built (i.e. not git-tracked) files to go into the tmt target. IMHO this is just confusing, inefficient, and unpredictable, so I'm all for making this not configurable. (But as always, https://m.xkcd.com/1172/ 😁 )

@LecrisUT
Copy link
Collaborator

LecrisUT commented Jun 21, 2024

This PR doesn't change anything if the directory isn't a git tree

I'm not sure about that, I don't see relevant checks for if the worktree is a git near where _initialize_worktree is called. The previous workflow would always work because it was simply --exclude .git, which does nothing if it's not a git repo. An easy way to check is to actually run a simple plan+test in a non-git environment

@cgwalters
Copy link
Contributor Author

@happz happz added this to the 1.35 milestone Jun 21, 2024
@happz
Copy link
Collaborator

happz commented Jun 21, 2024

Seems like a good idea, although my experience with various directories in tmt is still limited. I would just propose different $SUBJ, rsync is called a lot and this case seems to be about pushing worktree to a guest, so how about something like "Honor .gitignore when pushing worktree to guest"?

@cgwalters
Copy link
Contributor Author

@happz ping - since you know the tmt code can I please ask you to drive this PR to completion?

@cgwalters
Copy link
Contributor Author

Hmm wait, are there two rsyncs that tmt does? Oh wow...there is...we do an rsync of the worktree once into /var/tmp/tmt (which would be dramatically faster/cheaper if it used reflinks) but what I'm now hitting is that tmt apparently rsyncs the worktree into the guest again if I'm using

discover:
  how: tmt

?

Ouch...so we'd clearly need to factor out shared rsync exclusions for these two things.

(This said again, the best fix would be to avoid full copies; for the local virt one we could use virtiofs, although that doesn't work for remote VMs)

@happz
Copy link
Collaborator

happz commented Jul 26, 2024

@happz ping - since you know the tmt code can I please ask you to drive this PR to completion?

Yeah, it's still on the roadmap for 1.35, I just need to find some time to wrap it up & ask folks for review :/

@happz happz added the ci | full test Pull request is ready for the full test execution label Jul 31, 2024
@happz
Copy link
Collaborator

happz commented Jul 31, 2024

My additions are in b7e8759.

@happz
Copy link
Collaborator

happz commented Jul 31, 2024

/packit build

Copy link
Collaborator

@martinhoyer martinhoyer left a comment

Choose a reason for hiding this comment

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

Wouldn't rsync --filter=':- .gitignore' work in this context? I see it mentioned also in the stackoverflow question linked in comment.

EDIT: Seems to work for me when copying tmt repo. --filter=':- .gitignore' --exclude=.git

@LecrisUT
Copy link
Collaborator

LecrisUT commented Jul 31, 2024

Wouldn't rsync --filter=':- .gitignore' work in this context? I see it mentioned also in the stackoverflow question linked in comment.

My main concern was if it picked up recursive .gitignore. it actually did:

$ tree -a ./
./
├── copy_this
├── .gitignore
├── other_value
├── some_folder
│   ├── copy_this_too
│   ├── .gitignore
│   └── ignore_me_too
└── some_valueA

2 directories, 7 files
$ tail .gitignore some_folder/.gitignore 
==> .gitignore <==
some_value*
/other_value

==> some_folder/.gitignore <==
ignore_me_too
$ rsync -a --filter=':- .gitignore' ./ ../test_rsync_out/
$ tree -a ../test_rsync_out/
../test_rsync_out/
├── copy_this
├── .gitignore
└── some_folder
    ├── copy_this_too
    └── .gitignore

2 directories, 4 files

👍 for such an approach IMO

cgwalters and others added 3 commits August 2, 2024 14:28
I am guessing I may be one of the first people to try using tmt
with a Rust project. The default for the `cargo` toolchain
is to keep a *lot* of cached incremental data in `target/`.
In my case with bootc, it's currently 20G.

A plain rsync() of this is *incredibly* inefficient. rsync doesn't
even use reflinks if available, though that's a distinct bug.

Use `git ls-files` to honor `.gitignore`.

Signed-off-by: Colin Walters <[email protected]>
@happz
Copy link
Collaborator

happz commented Aug 2, 2024

/packit build

@happz happz merged commit 96f6e23 into teemtee:main Aug 2, 2024
The-Mule pushed a commit to The-Mule/tmt that referenced this pull request Oct 14, 2024
I am guessing I may be one of the first people to try using tmt
with a Rust project. The default for the `cargo` toolchain
is to keep a *lot* of cached incremental data in `target/`.
In my case with bootc, it's currently 20G.

A plain rsync() of this is *incredibly* inefficient. rsync doesn't
even use reflinks if available, though that's a distinct bug.

Co-authored-by: Colin Walters <[email protected]>
Co-authored-by: Miloš Prchlík <[email protected]>
@cgwalters
Copy link
Contributor Author

cgwalters commented Apr 15, 2025

Sorry to resurrect this but my test runs are still failing with this symptom. In current bootc I'm doing

toolbx ~/src/github/containers/bootc> tmt run
/var/tmp/tmt/run-003

/tmt/plans/integration/test-01-readonly
    discover
        how: fmf
        directory: /var/home/walters/src/github/containers/bootc
        tests: /tmt/tests/test-00-bootc-install and /tmt/tests/test-01-readonly
        summary: 2 tests selected
    provision
        queued provision.provision task #1: default-0
        
        provision.provision task #1: default-0
        how: virtual
        image: https://composes.stream.centos.org/stream-10/production/CentOS-Stream-10-20250331.0/compose/BaseOS/x86_64/images/CentOS-Stream-GenericCloud-10-20250331.0.x86_64.qcow2
        memory: 2048 MB
        disk: 40 GB
        progress: booting...
        multihost name: default-0
        arch: x86_64
        distro: CentOS Stream 10 (Coughlan)
    
        summary: 1 guest provisioned
    prepare
        queued push task #1: push to default-0
        
        push task #1: push to default-0
    fail: Failed to push workdir to the guest. This usually means that login as 'root' to the guest does not work.
    fail: Command 'rsync -s -R -r -z --links --safe-links --delete -e 'ssh -oForwardX11=no -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oConnectionAttempts=5 -oConnectTimeout=60 -oServerAliveInterval=5 -oServerAliveCountMax=60 -oIdentitiesOnly=yes -p10023 -i /var/tmp/tmt/run-003/tmt/plans/integration/test-01-readonly/provision/default-0/id_ecdsa -oPasswordAuthentication=no -S/var/tmp/tmt/run-003/ssh-sockets/127.0.0.1-10023-root.socket' /var/tmp/tmt/run-003/tmt/plans/integration/test-01-readonly [email protected]:/' returned 11.
    report
        how: display
        summary: 2 pending
    finish
    
        summary: 0 tasks completed
        guest: stopped
        guest: removed

plan failed

The exception was caused by 1 earlier exceptions

Cause number 1:

    prepare step failed

    The exception was caused by 1 earlier exceptions

    Cause number 1:

        Command 'rsync -s -R -r -z --links --safe-links --delete -e 'ssh -oForwardX11=no -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oConnectionAttempts=5 -oConnectTimeout=60 -oServerAliveInterval=5 -oServerAliveCountMax=60 -oIdentitiesOnly=yes -p10023 -i /var/tmp/tmt/run-003/tmt/plans/integration/test-01-readonly/provision/default-0/id_ecdsa -oPasswordAuthentication=no -S/var/tmp/tmt/run-003/ssh-sockets/127.0.0.1-10023-root.socket' /var/tmp/tmt/run-003/tmt/plans/integration/test-01-readonly [email protected]:/' returned 11.

        # stderr (3/3 lines)
        # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        rsync: [receiver] write failed on "/var/tmp/tmt/run-003/tmt/plans/integration/test-01-readonly/discover/default-0/tests/target/debug/incremental/ostree_ext-3c5cidxgfnpy7/s-h5ibjesiez-1tccyjo-working/query-cache.bin": No space left on device (28)

The more I think about all of this, the more strongly I feel that what I really want out of tmt is to support a workflow that defines basically:

  1. Here is my bootc container image under test
  2. Here are my test cases

The problem that we're getting bit by here is tmt is gathering 2. via scraping out of the current working directory. If instead tests were themselves defined to be wrapped in e.g. a container image that was a build artifact, that would help ensure that we weren't leaking unintended contents into the target environment.

This would certainly have some overhead; anytime I went to change a test locally I'd have to do e.g. a container build. But we already have that requirement for changes to the code, so keeping thing symmetrical here would help isolate and add consistency.

@cgwalters
Copy link
Contributor Author

I feel like I must be the only project using Rust and tmt...

@LecrisUT
Copy link
Collaborator

LecrisUT commented Sep 5, 2025

I feel like I must be the only project using Rust and tmt...

Probably it is, but I am curious to see how you use it there :). But it being rust should not affect it, unless I am missing some deeper context of the tests. About the issue you've posted before, there is #4029 to move away from rsync for better or worse.

The problem that we're getting bit by here is tmt is gathering 2. via scraping out of the current working directory. If instead tests were themselves defined to be wrapped in e.g. a container image that was a build artifact, that would help ensure that we weren't leaking unintended contents into the target environment.

You could use provision.container? But I think it would be better to have some more context on the current tests and environments you are trying to work on.

@happz
Copy link
Collaborator

happz commented Sep 5, 2025

The more I think about all of this, the more strongly I feel that what I really want out of tmt is to support a workflow that defines basically:

  1. Here is my bootc container image under test
  2. Here are my test cases

The problem that we're getting bit by here is tmt is gathering 2. via scraping out of the current working directory. If instead tests were themselves defined to be wrapped in e.g. a container image that was a build artifact, that would help ensure that we weren't leaking unintended contents into the target environment.

Sooo... Like discover & how: fmf, but rather than current directory, snoop in a given container (image)?

This would certainly have some overhead; anytime I went to change a test locally I'd have to do e.g. a container build. But we already have that requirement for changes to the code, so keeping thing symmetrical here would help isolate and add consistency.

@cgwalters
Copy link
Contributor Author

Sooo... Like discover & how: fmf, but rather than current directory, snoop in a given container (image)?

Yes; I think an important aspect here is also that the tests can ergonomically be compiled code, rather than dynamically interpreted scripts.

Anyways though...could I work around this by just moving all the tmt stuff into a subdirectory? Let me see...

cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 15, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Move tmt/ into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 15, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Move tmt/ into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 15, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Move tmt/ into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 15, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Move tmt/ into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
@cgwalters
Copy link
Contributor Author

Anyways though...could I work around this by just moving all the tmt stuff into a subdirectory? Let me see...

Answer: I can't do that in the obvious way (mv .fmf tmt tests/ and change our CI to do cd tests && tmt ...) because it breaks packit's ability to discover and execute tests automatically.

Anyways so instead of a conversation on a closed PR I filed #4062

cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 15, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 16, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 16, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 16, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 16, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 16, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 17, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 17, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 17, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 17, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 17, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
cgwalters added a commit to cgwalters/bootc that referenced this pull request Sep 17, 2025
A key thing for me is that the `Justfile` should be a one-stop
shop for development of the project. It can't have everything but
it should answer the basic questions of "how do I build and test
this project".

This aligns the recently added tmt-on-GHA flow a *bit* more closely
with some of that. Biggest is to use the `just build-integration-test-image` as the canonical
way to build a container image with our testing stuff in it;
which uses our main Dockerfile

Other cleanups:
- Change test script to move into tests/tmt/ as a workaround for
  teemtee/tmt#3037 (comment)
- Change the qemu logic to use SMBIOS credentials so we don't
  have to carry around both a disk image and a SSH key
- Change qemu to use `-snapshot` so we can reuse disks
- Change the scripts to accept data via argv[1] and not environment
- Drop the hardcoded testing directory and use `target/` as
  a generic build artifact dir

Signed-off-by: Colin Walters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants