/Sanity/smoke is intended to work with all possible Java versions, JDK, JRE, or even minimal Java installations created with jlink.
39 lines
1.2 KiB
Bash
Executable file
39 lines
1.2 KiB
Bash
Executable file
#!/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
|