Onboard package into gating
This commit is contained in:
parent
06b3e0e5f9
commit
8e5048e657
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
9
gating.yaml
Normal file
9
gating.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_testing
|
||||
- bodhi_update_push_stable
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages.functional}
|
||||
7
plans/javapackages.fmf
Normal file
7
plans/javapackages.fmf
Normal file
@ -0,0 +1,7 @@
|
||||
summary: Run javapackages-specific tests
|
||||
discover:
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/javapackages
|
||||
ref: f39
|
||||
execute:
|
||||
how: tmt
|
||||
5
plans/smoke.fmf
Normal file
5
plans/smoke.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
4
tests/Sanity/smoke/main.fmf
Normal file
4
tests/Sanity/smoke/main.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
summary: javacc smoke test
|
||||
description: |
|
||||
Test basic functionality of javacc.
|
||||
require: java-devel
|
||||
48
tests/Sanity/smoke/runtest.sh
Executable file
48
tests/Sanity/smoke/runtest.sh
Executable file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
rlJournalStart
|
||||
|
||||
rlPhaseStartTest "check for presence of javacc commands"
|
||||
rlAssertRpm javacc
|
||||
rlAssertBinaryOrigin javacc javacc
|
||||
rlAssertBinaryOrigin javacc.sh javacc
|
||||
rlAssertBinaryOrigin jjtree javacc
|
||||
rlAssertBinaryOrigin jjdoc javacc
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "display javacc version"
|
||||
rlRun -s "javacc" 1
|
||||
rlAssertGrep "^Java Compiler Compiler Version" $rlRun_LOG
|
||||
rlAssertGrep "Parser Generator" $rlRun_LOG
|
||||
rlRun -s "javacc.sh" 1
|
||||
rlAssertGrep "^Java Compiler Compiler Version" $rlRun_LOG
|
||||
rlAssertGrep "Parser Generator" $rlRun_LOG
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "display jjtree version"
|
||||
rlRun -s "jjtree" 1
|
||||
rlAssertGrep "^Java Compiler Compiler Version" $rlRun_LOG
|
||||
rlAssertGrep "Tree Builder" $rlRun_LOG
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "display jjdoc version"
|
||||
rlRun -s "jjdoc" 1
|
||||
rlAssertGrep "^Java Compiler Compiler Version" $rlRun_LOG
|
||||
rlAssertGrep "Documentation Generator" $rlRun_LOG
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "generate, compile and run a simple parser"
|
||||
rlRun -s "javacc smoke.jj"
|
||||
rlAssertExists "Smoke.java"
|
||||
rlRun -s "javac *.java"
|
||||
rlRun -s "java -cp . Smoke '{}'"
|
||||
rlAssertNotGrep "." $rlRun_LOG
|
||||
rlRun -s "java -cp . Smoke '{{}'" 1
|
||||
rlAssertGrep "ParseException" $rlRun_LOG
|
||||
rlAssertGrep "EOF" $rlRun_LOG
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
||||
50
tests/Sanity/smoke/smoke.jj
Normal file
50
tests/Sanity/smoke/smoke.jj
Normal file
@ -0,0 +1,50 @@
|
||||
options {
|
||||
LOOKAHEAD = 1;
|
||||
CHOICE_AMBIGUITY_CHECK = 2;
|
||||
OTHER_AMBIGUITY_CHECK = 1;
|
||||
STATIC = true;
|
||||
DEBUG_PARSER = false;
|
||||
DEBUG_LOOKAHEAD = false;
|
||||
DEBUG_TOKEN_MANAGER = false;
|
||||
ERROR_REPORTING = true;
|
||||
JAVA_UNICODE_ESCAPE = false;
|
||||
UNICODE_INPUT = false;
|
||||
IGNORE_CASE = false;
|
||||
USER_TOKEN_MANAGER = false;
|
||||
USER_CHAR_STREAM = false;
|
||||
BUILD_PARSER = true;
|
||||
BUILD_TOKEN_MANAGER = true;
|
||||
SANITY_CHECK = true;
|
||||
FORCE_LA_CHECK = false;
|
||||
}
|
||||
|
||||
PARSER_BEGIN(Smoke)
|
||||
|
||||
/**
|
||||
* Simple brace matcher.
|
||||
*/
|
||||
public class Smoke {
|
||||
|
||||
/** Main entry point. */
|
||||
public static void main(String args[]) throws ParseException {
|
||||
Smoke parser = new Smoke(new java.io.StringReader(args[0]));
|
||||
parser.Input();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PARSER_END(Smoke)
|
||||
|
||||
/** Root production. */
|
||||
void Input() :
|
||||
{}
|
||||
{
|
||||
MatchedBraces() ("\n"|"\r")* <EOF>
|
||||
}
|
||||
|
||||
/** Brace matching production. */
|
||||
void MatchedBraces() :
|
||||
{}
|
||||
{
|
||||
"{" [ MatchedBraces() ] "}"
|
||||
}
|
||||
4
tests/main.fmf
Normal file
4
tests/main.fmf
Normal file
@ -0,0 +1,4 @@
|
||||
contact: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
framework: beakerlib
|
||||
test: ./runtest.sh
|
||||
tier: 1
|
||||
Loading…
Reference in New Issue
Block a user