Compare commits

..

No commits in common. "c9-beta" and "c10s" have entirely different histories.

8 changed files with 68 additions and 2 deletions

11
.gitignore vendored
View File

@ -1 +1,10 @@
SOURCES/pycdlib-1.11.0.tar.gz
/pycdlib-1.1.0.tar.gz
/pycdlib-1.3.1.tar.gz
/pycdlib-1.3.2.tar.gz
/pycdlib-1.4.0.tar.gz
/pycdlib-1.5.0.tar.gz
/pycdlib-1.6.0.tar.gz
/pycdlib-1.7.0.tar.gz
/pycdlib-1.8.0.tar.gz
/pycdlib-1.9.0.tar.gz
/pycdlib-1.11.0.tar.gz

View File

@ -1 +0,0 @@
ce2bf75dcdc722bdc068cfba76c26fa30deb13db SOURCES/pycdlib-1.11.0.tar.gz

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (pycdlib-1.11.0.tar.gz) = 5020fa72d0a47457d54032125215ac120e3ab68e3a2c81fdc7a2705ce2a8f2e17458e144081218c4e103a0d346416cf46d70a6c56e1111f257e8b0602bace1dc

12
tests/simple/run_tests.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -eux
# Make a very simple iso with a volid
xorrisofs -o file.iso -V "test-pycdlib-volid" || exit 1
python3 ./test-pycdlib.py file.iso "test-pycdlib-volid" || exit 1
# Run a couple of the example scripts
python3 /usr/share/doc/python3-pycdlib/examples/create-bootable.py || exit 1
file eltorito.iso | grep bootable || exit 1
python3 /usr/share/doc/python3-pycdlib/examples/create-new.py || exit 1
file new.iso | grep "ISO 9660 CD-ROM" || exit 1

View File

@ -0,0 +1,27 @@
"""Simple test for pycdlib
Extract the volid from the iso and compare it to the one passed on the cmdline
"""
import os
import sys
import pycdlib
from pycdlib.pycdlibexception import PyCdlibException
if len(sys.argv) != 3:
print("usage: %s file.iso volid" % (sys.argv[0]))
sys.exit(1)
try:
iso = pycdlib.PyCdlib()
iso.open(sys.argv[1])
volid = iso.pvd.volume_identifier.decode("UTF-8").strip()
except PyCdlibException as e:
print("ERROR: Problem reading label from %s: %s" % (self.iso_path, e))
sys.exit(1)
print("VOLID: %s" % volid)
if volid != sys.argv[2]:
print("ERROR: %s != %s" % (volid, sys.argv[2]))
sys.exit(1)
sys.exit(0)

12
tests/tests.yml Normal file
View File

@ -0,0 +1,12 @@
---
- hosts: localhost
tags:
- classic
roles:
- role: standard-test-basic
required_packages:
- python-pycdlib
- xorriso
tests:
- simple:
run: ./run_tests.sh