#!/bin/sh # Checks that as works . /usr/share/beakerlib/beakerlib.sh # Set the full test name TEST="/AppStream/binutils/Sanity/binutils" # Package being tested PACKAGE="binutils" rlJournalStart # Setup phase: Prepare test directory rlPhaseStartSetup rlAssertRpm $PACKAGE rlRun 'TmpDir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot rlRun "pushd $TmpDir" rlPhaseEnd # Test phase: Test the binutils utilities # FIXME: This is way too simplistic. The binutils testsuite does a much # more thorough job, but that has already been run as part of the binutils # build process, and besides we do not have access to an unpacked source # tree here. rlPhaseStartTest rlRun "echo nop >nop.s" 0 "Create a test assembler source file" rlRun "as nop.s -o nop.o" 0 "Assemble the test file" rlRun "objdump -D -r -x -W -t nop.o >objdump.out" 0 "Examine the file with objdump" rlAssertExists "objdump.out" rlRun "readelf -a -W --wide nop.o >readelf.out" 0 "Examine the file with readelf" rlAssertExists "readelf.out" rlRun "nm nop.o >nm.out" 0 "Examine the file with nm" rlAssertExists "nm.out" rlPhaseEnd # Cleanup phase: Remove test directory rlPhaseStartCleanup rlRun "popd" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd rlJournalEnd # Print the test report rlJournalPrintText