From cf60df0c162daeab7aed1b3b584b96fa083db911 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 17 Feb 2021 12:05:37 +0100 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/flex.git#d13f0a58066616f854749da1b196bacb941dfdea --- .fmf/version | 1 - gating.yaml | 19 ----- plans/ci.fmf | 6 -- tests/Sanity/smoke-check-flex-runs/Makefile | 63 --------------- tests/Sanity/smoke-check-flex-runs/PURPOSE | 3 - .../smoke-check-flex-runs/calc-grammar.y | 36 --------- .../Sanity/smoke-check-flex-runs/calc-lexer.l | 15 ---- .../count_chars_and_lines.l | 21 ----- .../expected_calc_output.txt | 3 - tests/Sanity/smoke-check-flex-runs/main.fmf | 15 ---- tests/Sanity/smoke-check-flex-runs/runtest.sh | 78 ------------------- 11 files changed, 260 deletions(-) delete mode 100644 .fmf/version delete mode 100644 gating.yaml delete mode 100644 plans/ci.fmf delete mode 100644 tests/Sanity/smoke-check-flex-runs/Makefile delete mode 100644 tests/Sanity/smoke-check-flex-runs/PURPOSE delete mode 100644 tests/Sanity/smoke-check-flex-runs/calc-grammar.y delete mode 100644 tests/Sanity/smoke-check-flex-runs/calc-lexer.l delete mode 100644 tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l delete mode 100644 tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt delete mode 100644 tests/Sanity/smoke-check-flex-runs/main.fmf delete mode 100755 tests/Sanity/smoke-check-flex-runs/runtest.sh diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index ce3cdc1..0000000 --- a/gating.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- !Policy -product_versions: - - fedora-* -decision_context: bodhi_update_push_stable -subject_type: koji_build -rules: - - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} ---- !Policy -product_versions: - - rhel-8 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} ---- !Policy -product_versions: - - rhel-9 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index 1ad2c12..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: CI Gating Plan -discover: - how: fmf - directory: tests -execute: - how: beakerlib diff --git a/tests/Sanity/smoke-check-flex-runs/Makefile b/tests/Sanity/smoke-check-flex-runs/Makefile deleted file mode 100644 index 3abe871..0000000 --- a/tests/Sanity/smoke-check-flex-runs/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/flex/Sanity/smoke-check-flex-runs -# Description: Show your version. Build a one-file project. -# Author: Vaclav Kadlcik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/flex/Sanity/smoke-check-flex-runs -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE count_chars_and_lines.l calc-lexer.l calc-grammar.y expected_calc_output.txt - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Vaclav Kadlcik " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Show your version. Build a one-file project." >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 15m" >> $(METADATA) - @echo "RunFor: flex" >> $(METADATA) - @echo "Requires: flex bison gcc" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/smoke-check-flex-runs/PURPOSE b/tests/Sanity/smoke-check-flex-runs/PURPOSE deleted file mode 100644 index ed0f21f..0000000 --- a/tests/Sanity/smoke-check-flex-runs/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/flex/Sanity/smoke-check-flex-runs -Description: Show your version. Build a one-file project. -Author: Vaclav Kadlcik diff --git a/tests/Sanity/smoke-check-flex-runs/calc-grammar.y b/tests/Sanity/smoke-check-flex-runs/calc-grammar.y deleted file mode 100644 index 53d4a85..0000000 --- a/tests/Sanity/smoke-check-flex-runs/calc-grammar.y +++ /dev/null @@ -1,36 +0,0 @@ -%{ -#include -%} - -%token NUMBER -%token ADD SUB MUL DIV -%token EOL - -%% - -input: - | input EOL { } - | input expression EOL { printf("%d\n", $2); } - ; - -expression: - factor - | expression ADD factor { $$ = $1 + $3; } - | expression SUB factor { $$ = $1 - $3; } - ; - -factor: - NUMBER - | factor MUL NUMBER { $$ = $1 * $3; } - | factor DIV NUMBER { $$ = $1 / $3; } - ; - -%% - -int main(int argc, char ** argv) { - yyparse(); -} - -yyerror(char *s) { - fprintf(stderr, "ERROR: %s\n", s); -} diff --git a/tests/Sanity/smoke-check-flex-runs/calc-lexer.l b/tests/Sanity/smoke-check-flex-runs/calc-lexer.l deleted file mode 100644 index fa9ac41..0000000 --- a/tests/Sanity/smoke-check-flex-runs/calc-lexer.l +++ /dev/null @@ -1,15 +0,0 @@ -%option noyywrap -%{ -#include "calc-grammar.tab.h" -%} - -%% -"+" { return ADD; } -"-" { return SUB; } -"*" { return MUL; } -"/" { return DIV; } -[0-9]+ { yylval = atoi(yytext); return NUMBER; } -\n { return EOL; } -[ \t] { /* ignore whitespaces */ } -. { yyerror("unexpected character %c", *yytext); } -%% diff --git a/tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l b/tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l deleted file mode 100644 index 7b90045..0000000 --- a/tests/Sanity/smoke-check-flex-runs/count_chars_and_lines.l +++ /dev/null @@ -1,21 +0,0 @@ -%option noyywrap -%{ -#include - -int chars = 0; -int lines = 0; -%} - -%% - -\n { lines++; chars++; } -. { chars++; } - -%% - -int main(int argc, char ** argv) { - yylex(); - printf("chars: %d\n", chars); - printf("lines: %d\n", lines); - return 0; -} diff --git a/tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt b/tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt deleted file mode 100644 index 7baa841..0000000 --- a/tests/Sanity/smoke-check-flex-runs/expected_calc_output.txt +++ /dev/null @@ -1,3 +0,0 @@ -STDOUT: 7 -STDOUT: -221 -STDOUT: 42 diff --git a/tests/Sanity/smoke-check-flex-runs/main.fmf b/tests/Sanity/smoke-check-flex-runs/main.fmf deleted file mode 100644 index 2b25e69..0000000 --- a/tests/Sanity/smoke-check-flex-runs/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: Show your version. Build a one-file project. -description: '' -contact: -- Vaclav Kadlcik -component: -- flex -test: ./runtest.sh -framework: beakerlib -recommend: -- flex -- bison -- gcc -duration: 15m -extra-summary: /tools/flex/Sanity/smoke-check-flex-runs -extra-task: /tools/flex/Sanity/smoke-check-flex-runs diff --git a/tests/Sanity/smoke-check-flex-runs/runtest.sh b/tests/Sanity/smoke-check-flex-runs/runtest.sh deleted file mode 100755 index 68ee8a3..0000000 --- a/tests/Sanity/smoke-check-flex-runs/runtest.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/flex/Sanity/smoke-check-flex-runs -# Description: Show your version. Build a one-file project. -# Author: Vaclav Kadlcik -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2015 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="flex" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - yum -y install bison gcc - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "cp count_chars_and_lines.l calc-lexer.l calc-grammar.y expected_calc_output.txt $TmpDir" - rlRun "pushd $TmpDir" - rlPhaseEnd - - rlPhaseStartTest 'Show version' - - rlRun -t -s 'flex -V' - rlAssertNotGrep '^STDERR:' $rlRun_LOG - rlAssertGrep '^STDOUT: flex [0-9]' $rlRun_LOG - - rlPhaseEnd - - rlPhaseStartTest 'Flex works standalone' - - rlRun 'flex -o count_chars_and_lines.c count_chars_and_lines.l' - rlRun 'gcc -o count_chars_and_lines count_chars_and_lines.c' - rlAssertExists 'count_chars_and_lines' - rlRun -t -s 'echo -e "nazdar\nbazar" | ./count_chars_and_lines' - rlAssertNotGrep '^STDERR:' $rlRun_LOG - rlAssertGrep '^STDOUT: chars: 13$' $rlRun_LOG - rlAssertGrep '^STDOUT: lines: 2$' $rlRun_LOG - - rlPhaseEnd - - rlPhaseStartTest 'Flex works with Bison' - - rlRun 'bison -d calc-grammar.y' - rlRun 'flex calc-lexer.l' - rlRun 'gcc -o calc calc-grammar.tab.c lex.yy.c' - rlAssertExists 'calc' - rlRun -t -s 'echo -e "1 + 2 * 3\n1 - 666 / 3\n42" | ./calc' - rlAssertNotDiffer expected_calc_output.txt $rlRun_LOG - - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd