Add some gating CI tests
This commit is contained in:
parent
d8287391e7
commit
de1fe58a50
12
gating.yaml
Normal file
12
gating.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
5
tests/gcc-fedora-flags/hello.c
Normal file
5
tests/gcc-fedora-flags/hello.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdio.h>
|
||||
|
||||
void hello() {
|
||||
printf("Hello World\n");
|
||||
}
|
5
tests/gcc-fedora-flags/hello.cpp
Normal file
5
tests/gcc-fedora-flags/hello.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include <iostream>
|
||||
|
||||
void hello() {
|
||||
std::cout << "Hello World\n";
|
||||
}
|
6
tests/gcc-fedora-flags/main.c
Normal file
6
tests/gcc-fedora-flags/main.c
Normal file
@ -0,0 +1,6 @@
|
||||
void hello();
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
hello();
|
||||
return 0;
|
||||
}
|
6
tests/gcc-fedora-flags/main.cpp
Normal file
6
tests/gcc-fedora-flags/main.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
void hello();
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
hello();
|
||||
return 0;
|
||||
}
|
29
tests/gcc-fedora-flags/runtest.sh
Normal file
29
tests/gcc-fedora-flags/runtest.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
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}`
|
||||
|
||||
test "$default_cflags" = "$cflags"
|
||||
test "$default_cxxflags" = "$cxxflags"
|
||||
test "$default_ldflags" = "$ldflags"
|
||||
|
||||
gcc $cflags -o hello.o -c hello.c
|
||||
annocheck hello.o
|
||||
gcc $cflags -o main.o -c main.c
|
||||
gcc $ldflags -o hello main.o hello.o
|
||||
annocheck hello
|
||||
./hello | grep "Hello World"
|
||||
|
||||
g++ $cxxflags -o hello-cpp.o -c hello.cpp
|
||||
annocheck hello-cpp.o
|
||||
g++ $cxxflags -o main-cpp.o -c main.cpp
|
||||
g++ $ldflags -o hello-cpp main-cpp.o hello-cpp.o
|
||||
annocheck hello-cpp
|
||||
./hello-cpp | grep "Hello World"
|
19
tests/tests.yml
Normal file
19
tests/tests.yml
Normal file
@ -0,0 +1,19 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- rpm
|
||||
# clang/fedora-flags
|
||||
- clang
|
||||
#gcc-fedora-flags
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- annobin-annocheck
|
||||
repositories:
|
||||
- repo: https://src.fedoraproject.org/tests/clang.git
|
||||
dest: clang
|
||||
tests:
|
||||
- clang/fedora-flags
|
||||
- gcc-fedora-flags
|
Loading…
Reference in New Issue
Block a user