Add upstream tests

This commit is contained in:
František Hrdina 2024-07-29 15:51:28 +02:00
commit 384cf48713
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,22 @@
summary: Upstream tests
description: ''
contact: František Hrdina <fhrdina@redhat.com>
component:
- utf8proc
test: ./test.sh
framework: beakerlib
recommend:
- utf8proc
- rpmdevtools
- rpm-build
- gcc
- perl
duration: 15m
enabled: true
tag:
- Tier1
tier: '1'
adjust:
- enabled: false
when: distro < rhel-7
continue: false

29
Sanity/upstream-tests/test.sh Executable file
View file

@ -0,0 +1,29 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlAssertRpm utf8proc
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlFetchSrcForInstalled utf8proc
rlRun "rpmdev-setuptree"
rlRun "rpm -ivh utf8proc*.src.rpm"
rlRun "rpmbuild -ba ~/rpmbuild/SPECS/utf8proc.spec &> build.log"
rlPhaseEnd
rlPhaseStartTest
rlAssertGrep "Character-width tests SUCCEEDED" build.log
rlAssertGrep "Misc tests SUCCEEDED" build.log
rlAssertGrep "Validity tests SUCCEEDED" build.log
rlAssertGrep "utf8proc_iterate tests SUCCEEDED" build.log
rlAssertGrep "utf8proc case conversion tests SUCCEEDED" build.log
rlAssertGrep "map_custom tests SUCCEEDED" build.log
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd