Compare commits
No commits in common. "c8" and "c8s" have entirely different histories.
@ -1 +0,0 @@
|
|||||||
340a18695d88be7c27574eaa88002a249cf851d8 SOURCES/catch1-1.12.1.tar.gz
|
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
SOURCES/catch1-1.12.1.tar.gz
|
/catch1-1.12.0.tar.gz
|
||||||
|
/catch1-1.12.1.tar.gz
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
%bcond_without check
|
||||||
|
|
||||||
Name: catch1
|
Name: catch1
|
||||||
Version: 1.12.1
|
Version: 1.12.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A modern, C++-native, header-only, framework for unit-tests, TDD and BDD
|
Summary: A modern, C++-native, header-only, framework for unit-tests, TDD and BDD
|
||||||
|
|
||||||
License: Boost
|
License: Boost
|
||||||
@ -44,10 +45,11 @@ mkdir -p %{buildroot}%{_includedir}
|
|||||||
cp -pr include %{buildroot}%{_includedir}/catch
|
cp -pr include %{buildroot}%{_includedir}/catch
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
%check
|
%check
|
||||||
cd build
|
cd build
|
||||||
ctest -V %{?_smp_mflags}
|
ctest -V %{?_smp_mflags}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc README.md catch-logo-small.png docs
|
%doc README.md catch-logo-small.png docs
|
||||||
@ -56,6 +58,9 @@ ctest -V %{?_smp_mflags}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 24 2019 Daniel Kopecek <dkopecek@redhat.com> - 1.12.1-2
|
||||||
|
- spec: make the check phase conditional
|
||||||
|
|
||||||
* Sat Mar 3 2018 Tom Hughes <tom@compton.nu> - 1.12.1-1
|
* Sat Mar 3 2018 Tom Hughes <tom@compton.nu> - 1.12.1-1
|
||||||
- Update to 1.12.1 upstream release
|
- Update to 1.12.1 upstream release
|
||||||
|
|
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
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (catch1-1.12.1.tar.gz) = 3d9ea74b0e150059be641d320b77f0ef18190f190c010fd74e60f6c8299ffd183cb8a96d540a8bddc694d7fbbd5d7a411cce2250655d8eda4ad8db911c0ddbc8
|
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