diff --git a/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/Makefile b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/Makefile new file mode 100644 index 0000000..ce2f5e9 --- /dev/null +++ b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/binutils/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot +# Description: Test for BZ#1080077 ([RFE] - Please configure ld.bfd to allow --sysroot) +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/binutils/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#1080077 ([RFE] - Please configure ld.bfd to allow --sysroot)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: binutils" >> $(METADATA) + @echo "Requires: binutils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1080077" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/PURPOSE b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/PURPOSE new file mode 100644 index 0000000..d481738 --- /dev/null +++ b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/binutils/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot +Description: Test for BZ#1080077 ([RFE] - Please configure ld.bfd to allow --sysroot) +Author: Martin Cermak +Bug summary: [RFE] - Please configure ld.bfd to allow --sysroot +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1080077 diff --git a/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/main.fmf b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/main.fmf new file mode 100644 index 0000000..186bfaf --- /dev/null +++ b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/main.fmf @@ -0,0 +1,16 @@ +summary: Test for BZ#1080077 ([RFE] - Please configure ld.bfd to allow --sysroot) +description: | + Bug summary: [RFE] - Please configure ld.bfd to allow --sysroot + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1080077 +contact: Martin Cermak +component: +- binutils +test: ./runtest.sh +framework: beakerlib +recommend: +- binutils +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1080077 +extra-summary: /tools/binutils/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot +extra-task: /tools/binutils/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot diff --git a/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/runtest.sh b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/runtest.sh new file mode 100755 index 0000000..4e15016 --- /dev/null +++ b/tests/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot/runtest.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/binutils/Regression/bz1080077-RFE-Please-configure-ld-bfd-to-allow-sysroot +# Description: Test for BZ#1080077 ([RFE] - Please configure ld.bfd to allow --sysroot) +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartTest + LD_BDF=$(which ld.bfd) + RPM=$(rpm -qf $LD_BDF) + rlLogInfo "ld.bfd is $LD_BDF of $RPM" + rlRun "ld.bfd --sysroot=/tmp |& grep 'not configured to use sysroots'" 1 + rlRun "ld.bfd --sysroot=/tmp |& grep 'no input files'" + rlPhaseEnd +rlJournalEnd