re-import sources as agreed with the maintainer
This commit is contained in:
parent
29866aef55
commit
26900ae680
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/catch1-1.12.0.tar.gz
|
||||
/catch1-1.12.1.tar.gz
|
||||
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
1
tests/.fmf/version
Normal file
1
tests/.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
14
tests/devel-usability/factorial.cpp
Normal file
14
tests/devel-usability/factorial.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch/catch.hpp>
|
||||
|
||||
unsigned int Factorial(unsigned int number) {
|
||||
return number <= 1 ? number : Factorial(number - 1) * number;
|
||||
}
|
||||
|
||||
TEST_CASE("Factorials are computed", "[factorial]") {
|
||||
REQUIRE(Factorial(1) == 1);
|
||||
REQUIRE(Factorial(2) == 2);
|
||||
REQUIRE(Factorial(3) == 6);
|
||||
REQUIRE(Factorial(10) == 3628800);
|
||||
}
|
||||
|
22
tests/devel-usability/runtest.sh
Executable file
22
tests/devel-usability/runtest.sh
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
TEST_SOURCE=factorial.cpp
|
||||
TEST_TARGET="${TEST_SOURCE/\.cpp/}"
|
||||
|
||||
CXXFLAGS="$(rpm --eval '%{build_cxxflags}')"
|
||||
LDFLAGS="$(rpm --eval '%{build_ldflags}')"
|
||||
LIBFLAGS=""
|
||||
|
||||
# build target using distribution-specific flags
|
||||
g++ -std=c++11 $CXXFLAGS $LDFLAGS $LIBFLAGS -o $TEST_TARGET $TEST_SOURCE
|
||||
|
||||
# test that target exists
|
||||
test -f ./$TEST_TARGET
|
||||
|
||||
# test that target is executable
|
||||
test -x ./$TEST_TARGET
|
||||
|
||||
# test that target runs successfully
|
||||
./$TEST_TARGET
|
4
tests/provision.fmf
Normal file
4
tests/provision.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
standard-inventory-qcow2:
|
||||
qemu:
|
||||
m: 4G
|
13
tests/tests.yml
Normal file
13
tests/tests.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tests:
|
||||
- devel-usability
|
||||
required_packages:
|
||||
- gcc-c++
|
||||
- rpm
|
||||
- redhat-rpm-config
|
||||
- catch1-devel
|
Loading…
Reference in New Issue
Block a user