Merge #11 Add test via annobin

This commit is contained in:
Jakub Jelinek 2020-08-31 10:13:34 +00:00
commit 6358fb610c
4 changed files with 33 additions and 0 deletions

9
tests/build_hello_world.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -ex
gcc -x c $(rpm --eval %build_cflags) data/hello.c -o hello_c.out
./hello_c.out | grep -q "Hello World"
g++ -x c++ $(rpm --eval %build_cxxflags) data/hello.cpp -o hello_cpp.out
./hello_cpp.out | grep -q "Hello World"

5
tests/data/hello.c Normal file
View File

@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
printf("Hello World!\n");
return 0;
}

5
tests/data/hello.cpp Normal file
View File

@ -0,0 +1,5 @@
#include <iostream>
int main() {
std::cout << "Hello World!\n";
return 0;
}

14
tests/tests.yml Normal file
View File

@ -0,0 +1,14 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- redhat-rpm-config
- annobin
tests:
- build_hello_world:
dir: .
run: "./build_hello_world.sh"