604b1841b5
Related: https://pagure.io/fedora-ci/general/issue/206 Also, drop unneeded legacy Makefile's and PURPOSE files, and explicitly require gcc.rpm, which is not installed on the CI workers by default any more it seems.
39 lines
1.1 KiB
Bash
Executable File
39 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
|
set -x
|
|
|
|
default_cflags=`rpm -E %{build_cflags}`
|
|
default_cxxflags=`rpm -E %{build_cxxflags}`
|
|
default_ldflags=`rpm -E %{build_ldflags}`
|
|
|
|
cflags=`rpm -D '%toolchain gcc' -E %{build_cflags}`
|
|
cxxflags=`rpm -D '%toolchain gcc' -E %{build_cxxflags}`
|
|
ldflags=`rpm -D '%toolchain gcc' -E %{build_ldflags}`
|
|
|
|
set +x
|
|
|
|
rlJournalStart
|
|
rlPhaseStartTest
|
|
rlRun "test \"$default_cflags\" = \"$cflags\""
|
|
rlRun "test \"$default_cxxflags\" = \"$cxxflags\""
|
|
rlRun "test \"$default_ldflags\" = \"$ldflags\""
|
|
|
|
rlRun "gcc $cflags -o hello.o -c hello.c"
|
|
rlRun "annocheck hello.o"
|
|
rlRun "gcc $cflags -o main.o -c main.c"
|
|
rlRun "gcc $ldflags -o hello main.o hello.o"
|
|
rlRun "annocheck hello"
|
|
rlRun "./hello | grep \"Hello World\""
|
|
|
|
rlRun "g++ $cxxflags -o hello-cpp.o -c hello.cpp"
|
|
rlRun "annocheck hello-cpp.o"
|
|
rlRun "g++ $cxxflags -o main-cpp.o -c main.cpp"
|
|
rlRun "g++ $ldflags -o hello-cpp main-cpp.o hello-cpp.o"
|
|
rlRun "annocheck hello-cpp"
|
|
rlRun "./hello-cpp | grep \"Hello World\""
|
|
rlPhaseEnd
|
|
rlJournalPrintText
|
|
rlJournalEnd
|