re-import sources as agreed with the maintainer
This commit is contained in:
parent
d163934232
commit
56730f1d14
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
|
/1.3.1.tar.gz
|
||||||
|
/2.6.0.tar.gz
|
||||||
/2.7.0.tar.gz
|
/2.7.0.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}
|
45
tests/devel-usability/hello_world.cpp
Normal file
45
tests/devel-usability/hello_world.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
// Copyright (c) 2014-2019 Dr. Colin Hirsch and Daniel Frey
|
||||||
|
// Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <tao/pegtl.hpp>
|
||||||
|
|
||||||
|
namespace pegtl = tao::pegtl;
|
||||||
|
|
||||||
|
namespace hello
|
||||||
|
{
|
||||||
|
// clang-format off
|
||||||
|
struct prefix : pegtl::string< 'H', 'e', 'l', 'l', 'o', ',', ' ' > {};
|
||||||
|
struct name : pegtl::plus< pegtl::alpha > {};
|
||||||
|
struct grammar : pegtl::must< prefix, name, pegtl::one< '!' >, pegtl::eof > {};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
template< typename Rule >
|
||||||
|
struct action : pegtl::nothing<Rule>
|
||||||
|
{};
|
||||||
|
|
||||||
|
template<>
|
||||||
|
struct action< name >
|
||||||
|
{
|
||||||
|
template< typename Input >
|
||||||
|
static void apply( const Input& in, std::string& v )
|
||||||
|
{
|
||||||
|
v = in.string();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace hello
|
||||||
|
|
||||||
|
int main( int argc, char** argv )
|
||||||
|
{
|
||||||
|
if( argc > 1 ) {
|
||||||
|
std::string name;
|
||||||
|
|
||||||
|
pegtl::argv_input<> in( argv, 1 );
|
||||||
|
pegtl::parse< hello::grammar, hello::action >( in, name );
|
||||||
|
|
||||||
|
std::cout << "Good bye, " << name << "!" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
20
tests/devel-usability/runtest.sh
Executable file
20
tests/devel-usability/runtest.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
TEST_SOURCE=hello_world.cpp
|
||||||
|
TEST_TARGET="${TEST_SOURCE/\.cpp/}"
|
||||||
|
|
||||||
|
CXXFLAGS="$(rpm --eval '%{build_cxxflags}')"
|
||||||
|
LDFLAGS="$(rpm --eval '%{build_ldflags}')"
|
||||||
|
|
||||||
|
# build target using distribution-specific flags
|
||||||
|
g++ -std=c++11 $CXXFLAGS $LDFLAGS -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 "Hello, world!"
|
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
|
||||||
|
- PEGTL-devel
|
Loading…
Reference in New Issue
Block a user