Backport tests from Fedora
This commit is contained in:
parent
d2675e0d8f
commit
de97470f18
@ -1,20 +1,5 @@
|
||||
summary: Basic smoke test
|
||||
discover:
|
||||
how: shell
|
||||
tests:
|
||||
- name: /smoke/generate-stax-reader
|
||||
test: |
|
||||
set -x
|
||||
PATH=/usr/lib/jvm/java-11-openjdk/bin:${PATH}
|
||||
modello plans/smoke.mdo java test-src 1.0.0 foo 8
|
||||
javac -d test-bin test-src/smoke/*
|
||||
modello plans/smoke.mdo stax-reader test-src 1.0.0 foo 8
|
||||
javac -d test-bin -cp test-bin test-src/smoke/io/stax/*
|
||||
find test-src test-bin
|
||||
test -f test-bin/smoke/SomeBean.class
|
||||
test -f test-bin/smoke/io/stax/SmokeStaxReader.class
|
||||
prepare:
|
||||
how: install
|
||||
package: java-11-openjdk-devel
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
|
||||
6
tests/Sanity/smoke/main.fmf
Normal file
6
tests/Sanity/smoke/main.fmf
Normal file
@ -0,0 +1,6 @@
|
||||
summary: modello smoke test
|
||||
description: |
|
||||
Test basic functionality of modello.
|
||||
require:
|
||||
- modello
|
||||
- java-21-openjdk-devel
|
||||
29
tests/Sanity/smoke/runtest.sh
Executable file
29
tests/Sanity/smoke/runtest.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
. /usr/share/beakerlib/beakerlib.sh
|
||||
|
||||
rlJournalStart
|
||||
|
||||
PATH=/usr/lib/jvm/java-21-openjdk/bin:${PATH}
|
||||
|
||||
rlPhaseStartTest "check for presence of modello command"
|
||||
rlAssertRpm modello
|
||||
rlAssertBinaryOrigin modello modello
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "display modello usage"
|
||||
rlRun -s "modello" 1
|
||||
rlAssertGrep "Usage: modello" $rlRun_LOG
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest "generate STAX reader"
|
||||
rlRun "modello smoke.mdo java test-src 1.0.0 foo 8"
|
||||
rlRun "javac -d test-bin test-src/smoke/*"
|
||||
rlAssertExists test-bin/smoke/SomeBean.class
|
||||
rlRun "modello smoke.mdo stax-reader test-src 1.0.0 foo 8"
|
||||
rlRun "javac -d test-bin -cp test-bin test-src/smoke/io/stax/*"
|
||||
rlAssertExists test-bin/smoke/io/stax/SmokeStaxReader.class
|
||||
rlPhaseEnd
|
||||
|
||||
rlJournalEnd
|
||||
rlJournalPrintText
|
||||
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: 0
|
||||
Loading…
Reference in New Issue
Block a user