Compare commits
No commits in common. "c8-beta-stream-4" and "stream-jaxb-4-rhel-8.9.0" have entirely different histories.
c8-beta-st
...
stream-jax
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
0
.gitignore
vendored
0
.gitignore
vendored
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate_modules
|
||||
subject_type: redhat-module
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.redhat-module.other.functional}
|
@ -39,31 +39,31 @@ data:
|
||||
rpms:
|
||||
jakarta-activation2:
|
||||
buildorder: 10
|
||||
ref: stream-jaxb-4-rhel-8.8.0
|
||||
ref: stream-jaxb-4-rhel-8.9.0
|
||||
rationale: Build dependency of jaxb.
|
||||
jaxb-dtd-parser:
|
||||
buildorder: 10
|
||||
ref: stream-jaxb-4-rhel-8.8.0
|
||||
ref: stream-jaxb-4-rhel-8.9.0
|
||||
rationale: Build dependency of jaxb.
|
||||
jaxb-fi:
|
||||
buildorder: 10
|
||||
ref: stream-jaxb-4-rhel-8.8.0
|
||||
ref: stream-jaxb-4-rhel-8.9.0
|
||||
rationale: Build dependency of jaxb.
|
||||
buildonly: true
|
||||
jaxb-api4:
|
||||
buildorder: 20
|
||||
ref: stream-jaxb-4-rhel-8.8.0
|
||||
ref: stream-jaxb-4-rhel-8.9.0
|
||||
rationale: Build dependency of jaxb.
|
||||
jaxb-istack-commons:
|
||||
buildorder: 20
|
||||
ref: stream-jaxb-4-rhel-8.8.0
|
||||
ref: stream-jaxb-4-rhel-8.9.0
|
||||
rationale: Build dependency of jaxb.
|
||||
jaxb-stax-ex:
|
||||
buildorder: 30
|
||||
ref: stream-jaxb-4-rhel-8.8.0
|
||||
ref: stream-jaxb-4-rhel-8.9.0
|
||||
rationale: Build dependency of jaxb.
|
||||
buildonly: true
|
||||
jaxb:
|
||||
buildorder: 40
|
||||
ref: stream-jaxb-4-rhel-8.8.0
|
||||
ref: stream-jaxb-4-rhel-8.9.0
|
||||
rationale: Module API.
|
45
plans/Smoke.java
Normal file
45
plans/Smoke.java
Normal file
@ -0,0 +1,45 @@
|
||||
import jakarta.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import jakarta.xml.bind.JAXBContext;
|
||||
import jakarta.xml.bind.JAXBException;
|
||||
import jakarta.xml.bind.Marshaller;
|
||||
import jakarta.xml.bind.Unmarshaller;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
||||
@XmlRootElement(namespace = "org.fedoraproject.jaxb.test.smoke")
|
||||
class Data
|
||||
{
|
||||
public String text = "default text";
|
||||
public int number = 123;
|
||||
}
|
||||
|
||||
public class Smoke
|
||||
{
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
JAXBContext context = JAXBContext.newInstance(Data.class);
|
||||
Marshaller m = context.createMarshaller();
|
||||
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
m.marshal(new Data(), baos);
|
||||
|
||||
Unmarshaller um = context.createUnmarshaller();
|
||||
|
||||
Data data;
|
||||
try (InputStream is = new ByteArrayInputStream(baos.toByteArray())) {
|
||||
data = Data.class.cast(um.unmarshal(is));
|
||||
}
|
||||
|
||||
if (!data.text.equals("default text"))
|
||||
{
|
||||
throw new RuntimeException("Expected \"default text\", found \"" + data.text + "\"");
|
||||
}
|
||||
if (data.number != 123)
|
||||
{
|
||||
throw new RuntimeException("Expected 123, found " + String.valueOf(data.number));
|
||||
}
|
||||
}
|
||||
}
|
24
plans/smoke.fmf
Normal file
24
plans/smoke.fmf
Normal file
@ -0,0 +1,24 @@
|
||||
summary: Basic smoke test
|
||||
prepare:
|
||||
- how: install
|
||||
package:
|
||||
- jakarta-activation2
|
||||
- java-11-openjdk-devel
|
||||
- jaxb-core
|
||||
- jaxb-istack-commons-runtime
|
||||
- jaxb-runtime
|
||||
discover:
|
||||
how: shell
|
||||
tests:
|
||||
- name: /smoke/marshal-unmarshal
|
||||
test: |
|
||||
CLASSPATH+=:/usr/share/java/jakarta-activation2/jakarta.activation-api-2.jar
|
||||
CLASSPATH+=:/usr/share/java/jaxb-api4/jakarta.xml.bind-api-4.jar
|
||||
CLASSPATH+=:/usr/share/java/jaxb-istack-commons/istack-commons-runtime.jar
|
||||
CLASSPATH+=:/usr/share/java/jaxb/jaxb-runtime.jar
|
||||
CLASSPATH+=:/usr/share/java/jaxb/jaxb-core.jar
|
||||
export CLASSPATH
|
||||
/usr/lib/jvm/java-11-openjdk/bin/javac plans/Smoke.java
|
||||
/usr/lib/jvm/java-11-openjdk/bin/java -cp "${CLASSPATH}:plans" Smoke
|
||||
execute:
|
||||
how: tmt
|
Loading…
Reference in New Issue
Block a user