diff --git a/tests/test-parsing/parse.py b/tests/test-parsing/parse.py new file mode 100755 index 0000000..0e82819 --- /dev/null +++ b/tests/test-parsing/parse.py @@ -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) diff --git a/tests/test-parsing/run.sh b/tests/test-parsing/run.sh new file mode 100755 index 0000000..33a965f --- /dev/null +++ b/tests/test-parsing/run.sh @@ -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