#!/bin/bash . /usr/share/beakerlib/beakerlib.sh TEST="/AppStream/compat-libtiff3/Sanity/get-version" PACKAGES=${PACKAGES:-"compat-libtiff3"} REQUIRES=${REQUIRES:-"gcc"} LIBRARY="libtiff.so.3" rlJournalStart rlPhaseStartSetup rlAssertRpm --all rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "cp get-version.c $TmpDir/." 0 "Copying test code" rlRun "pushd $TmpDir" rlPhaseEnd rlPhaseStartTest rlRun "gcc -l:$LIBRARY get-version.c -o get-version" 0 "Compiling test code" rlAssertExists "get-version" rlRun "./get-version > out" 0 "Running test code" rlAssertGrep "^LIBTIFF, Version 3\." "out" rlPhaseEnd rlPhaseStartCleanup rlRun "popd" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd rlJournalPrintText rlJournalEnd