Extract /Sanity/build-java-project out of /Sanity/smoke
/Sanity/smoke is intended to work with all possible Java versions, JDK, JRE, or even minimal Java installations created with jlink.
This commit is contained in:
parent
e614fc40ef
commit
367b225f17
7 changed files with 47 additions and 31 deletions
8
Sanity/build-java-project/main.fmf
Normal file
8
Sanity/build-java-project/main.fmf
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
summary: Ant Java project test
|
||||
description: |
|
||||
Build and test a simple Java project with Ant.
|
||||
require+:
|
||||
- ant-junit
|
||||
tag-:
|
||||
- jre8
|
||||
- unbound
|
||||
39
Sanity/build-java-project/runtest.sh
Executable file
39
Sanity/build-java-project/runtest.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
rlJournalStart
|
||||
|
||||
rlPhaseStartTest "check for presence of ant command"
|
||||
rlAssertRpm ant
|
||||
rlAssertBinaryOrigin ant ant
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "build simple project"
|
||||
rlAssertRpm ant-junit
|
||||
rm -rf build
|
||||
rlRun -s "ant -v clean"
|
||||
rlAssertNotExists build
|
||||
rlRun -s "ant -v test"
|
||||
rlAssertGrep "Running tt.MyTest" $rlRun_LOG
|
||||
rlAssertGrep "Tests run: 1, Failures: 0, Errors: 0, Skipped: 0" $rlRun_LOG
|
||||
rlAssertGrep "BUILD SUCCESSFUL" $rlRun_LOG
|
||||
rlAssertExists build/main/tt/My.class
|
||||
rlAssertExists build/test/tt/MyTest.class
|
||||
if [ "${OPENJDK_HEADLESS}" != "true" ]; then
|
||||
rlRun -s "ant -v javadoc"
|
||||
rlAssertExists build/javadoc/index.html
|
||||
rlAssertExists build/javadoc/tt/My.html
|
||||
fi
|
||||
rlRun -s "ant -v run -Darg1=42 -Darg2=59"
|
||||
rlAssertGrep "RESULT is 101" $rlRun_LOG
|
||||
rlAssertGrep "BUILD SUCCESSFUL" $rlRun_LOG
|
||||
rlRun -s "ant -v run-nofork -Darg1=42 -Darg2=60"
|
||||
rlAssertGrep "RESULT is 102" $rlRun_LOG
|
||||
rlAssertGrep "BUILD SUCCESSFUL" $rlRun_LOG
|
||||
rlRun -s "ant -v clean"
|
||||
rlAssertNotExists build
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
||||
|
|
@ -1,8 +1,3 @@
|
|||
summary: Ant smoke test
|
||||
description: |
|
||||
Test basic functionality of Ant.
|
||||
require+:
|
||||
- ant-junit
|
||||
tag-:
|
||||
- jre8
|
||||
- unbound
|
||||
|
|
|
|||
|
|
@ -30,31 +30,5 @@ rlJournalStart
|
|||
rlAssertGrep "BUILD SUCCESSFUL" $rlRun_LOG
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "build simple project"
|
||||
rlAssertRpm ant-junit
|
||||
rm -rf build
|
||||
rlRun -s "ant -v clean"
|
||||
rlAssertNotExists build
|
||||
rlRun -s "ant -v test"
|
||||
rlAssertGrep "Running tt.MyTest" $rlRun_LOG
|
||||
rlAssertGrep "Tests run: 1, Failures: 0, Errors: 0, Skipped: 0" $rlRun_LOG
|
||||
rlAssertGrep "BUILD SUCCESSFUL" $rlRun_LOG
|
||||
rlAssertExists build/main/tt/My.class
|
||||
rlAssertExists build/test/tt/MyTest.class
|
||||
if [ "${OPENJDK_HEADLESS}" != "true" ]; then
|
||||
rlRun -s "ant -v javadoc"
|
||||
rlAssertExists build/javadoc/index.html
|
||||
rlAssertExists build/javadoc/tt/My.html
|
||||
fi
|
||||
rlRun -s "ant -v run -Darg1=42 -Darg2=59"
|
||||
rlAssertGrep "RESULT is 101" $rlRun_LOG
|
||||
rlAssertGrep "BUILD SUCCESSFUL" $rlRun_LOG
|
||||
rlRun -s "ant -v run-nofork -Darg1=42 -Darg2=60"
|
||||
rlAssertGrep "RESULT is 102" $rlRun_LOG
|
||||
rlAssertGrep "BUILD SUCCESSFUL" $rlRun_LOG
|
||||
rlRun -s "ant -v clean"
|
||||
rlAssertNotExists build
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue