Skip to content

Conversation

@praiskup
Copy link
Member

@praiskup praiskup commented Dec 16, 2025

No description provided.

@praiskup
Copy link
Member Author

/packit test

@praiskup praiskup marked this pull request as draft December 16, 2025 14:16
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adapts the test suite to run in testing-farm by adding a new test runner script, updating Ansible playbooks for environment preparation, and modifying a sanity test. The changes are logical and well-aligned with the goal. I've provided a few suggestions to enhance the new test runner script's robustness and flexibility, and to improve the Ansible playbook for better idempotency and clarity. The typo fix in behave/features/environment.py is also a good catch.

Comment on lines +3 to +4
our_dir=$(readlink -f "$(dirname "$0")")
tests_dir=$our_dir/../beaker-tests/Sanity/copr-cli-basic-operations

Choose a reason for hiding this comment

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

medium

For better robustness and to avoid issues with relative paths if this script is moved, it's advisable to determine the tests directory path from the repository's top-level directory. Other scripts in this repository, like testing-farm/tests/sanity/test.sh, already use git rev-parse --show-toplevel for this purpose.

Suggested change
our_dir=$(readlink -f "$(dirname "$0")")
tests_dir=$our_dir/../beaker-tests/Sanity/copr-cli-basic-operations
toplevel=$(git rev-parse --show-toplevel)
tests_dir=$toplevel/beaker-tests/Sanity/copr-cli-basic-operations

Comment on lines 21 to 25
if test $# -eq 0; then
for file in *.sh; do
run_test "$file"
done
fi

Choose a reason for hiding this comment

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

medium

The current implementation only runs tests if no arguments are provided to the script. If arguments are provided, it does nothing. It would be more flexible and intuitive to run all tests by default, but allow running specific tests if they are passed as arguments. This change would make the script's behavior more aligned with common shell script practices.

Suggested change
if test $# -eq 0; then
for file in *.sh; do
run_test "$file"
done
fi
if [ $# -eq 0 ]; then
set -- *.sh
fi
for file in "$@"; do
run_test "$file"
done

Comment on lines +66 to +70
- name: test environment hacks, inspired by DockerTestEnv/Dockerfile
shell: |
for repo in fedora updates updates-testing; do \
dnf -y config-manager setopt $repo.excludepkgs=hello ; done
echo 'set -g history-limit 40960' > /root/.tmux.conf

Choose a reason for hiding this comment

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

medium

This task combines two unrelated setup steps. It's better to split them into separate tasks for clarity, maintainability, and idempotency. Using the copy module for creating the .tmux.conf file is idempotent, unlike the echo command in a shell task, which will run on every execution.

- name: Exclude 'hello' package from default repositories
  shell: |
    for repo in fedora updates updates-testing; do
      dnf -y config-manager setopt "${repo}.excludepkgs=hello"
    done

- name: Configure tmux history limit
  copy:
    content: "set -g history-limit 40960"
    dest: /root/.tmux.conf
    mode: '0644'

@github-actions
Copy link

github-actions bot commented Dec 16, 2025

Pull Request validation

Failed

🔴 Failed or pending checks:

  • RPM package copr-rpmbuild[failure]

🔴 Review - Missing review from a member (2 required)

@praiskup
Copy link
Member Author

/packit test

1 similar comment
@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

1 similar comment
@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

@praiskup praiskup force-pushed the praiskup-tf-tests branch 2 times, most recently from c7e88e0 to d72fcf2 Compare December 18, 2025 23:16
@praiskup
Copy link
Member Author

/packit test

All our Copr instances support the needed architectures, even if
emulated.  The hello package works fine in emulated builds.
pulp is not tested
@praiskup
Copy link
Member Author

/packit test

2 similar comments
@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

1 similar comment
@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

/packit test

@praiskup
Copy link
Member Author

praiskup commented Dec 19, 2025

🎄 surprise - 🎉 https://artifacts.dev.testing-farm.io/a1abbcaf-266f-4383-aec1-1526ae5554f0/

--- Processing Results (Order of Completion) ---

✅ SUCCESS: runtest-openmandriva.sh - Completed at 11:55:39
✅ SUCCESS: auto-prune.sh - Completed at 11:56:09
✅ SUCCESS: runtest-exclude-chroots.sh - Completed at 11:56:11
✅ SUCCESS: pagure67.sh - Completed at 11:56:18
✅ SUCCESS: runtest-reset-to-defaults.sh - Completed at 11:56:28
✅ SUCCESS: runtest-createrepo.sh - Completed at 11:58:18
✅ SUCCESS: runtest-makesrpm-fail.sh - Completed at 11:59:33
✅ SUCCESS: runtest-build-results-json.sh - Completed at 12:03:35
✅ SUCCESS: runtest-autospec.sh - Completed at 12:03:44
✅ SUCCESS: runtest-fork.sh - Completed at 12:05:40
✅ SUCCESS: runtest-regenerate-repos.sh - Completed at 12:06:33
✅ SUCCESS: runtest-enable-net.sh - Completed at 12:11:03
✅ SUCCESS: runtest-webui.sh - Completed at 12:11:16
✅ SUCCESS: build-spec.sh - Completed at 12:14:28
✅ SUCCESS: runtest-pkg-no-sources.sh - Completed at 12:15:30
✅ SUCCESS: runtest-pkg-with-macros.sh - Completed at 12:15:31
✅ SUCCESS: runtest-buildtag.sh - Completed at 12:15:38
✅ SUCCESS: bz1457888.sh - Completed at 12:18:34
✅ SUCCESS: runtest-dnf-copr.sh - Completed at 12:22:50
✅ SUCCESS: runtest-epel.sh - Completed at 12:25:59
✅ SUCCESS: runtest-timeout.sh - Completed at 12:31:09
✅ SUCCESS: runtest-isolation.sh - Completed at 12:35:08
✅ SUCCESS: runtest-appstream.sh - Completed at 12:36:39
✅ SUCCESS: runtest-bootstrap.sh - Completed at 12:39:18
✅ SUCCESS: runtest-build-batches.sh - Completed at 12:39:25
✅ SUCCESS: runtest-build-attrs.sh - Completed at 12:39:43
✅ SUCCESS: runtest-coprdir.sh - Completed at 12:41:07
✅ SUCCESS: runtest-module-hotfixes.sh - Completed at 12:42:21
✅ SUCCESS: runtest-fedora-review.sh - Completed at 12:43:45
✅ SUCCESS: auto-createrepo.sh - Completed at 12:44:33
✅ SUCCESS: runtest-exclusivearch.sh - Completed at 12:46:10
✅ SUCCESS: runtest-delete.sh - Completed at 12:50:20
✅ SUCCESS: runtest-pypi.sh - Completed at 12:51:44
✅ SUCCESS: runtest-distgit.sh - Completed at 12:53:38
✅ SUCCESS: scm.sh - Completed at 12:58:09
✅ SUCCESS: runtest-architectures.sh - Completed at 12:59:34
✅ SUCCESS: runtest-custom-method.sh - Completed at 13:08:08
✅ SUCCESS: runtest.sh - Completed at 13:20:12

--- FINAL REPORT ---
Total Scripts: 38
Successful: 38
Failed: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant