Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test that tries to parse all Fedora packages #235

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions tests/test-parsing/parse.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/python3
import sys

from specfile import Specfile

# this is dump, but do the work
filename = sys.argv[1]
print("Parsing {}".format(filename))
specfile = Specfile(filename, force_parse=True)
8 changes: 8 additions & 0 deletions tests/test-parsing/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/bash
#rm -rf /tmp/rpm-specs/*

#curl https://src.fedoraproject.org/lookaside/rpm-specs-latest.tar.xz > /tmp/rpm-specs-latest.tar.xz
tar axf /tmp/rpm-specs-latest.tar.xz --directory /tmp
for spec in /tmp/rpm-specs/*.spec; do
parse.py "$spec" || echo "Error parsing $(basename $spec)" >&2
done | pv -ls $(ls /tmp/rpm-specs/*.spec | wc -l) >/dev/null