Roy Golan has uploaded a new change for review.

Change subject: packaging: fail the build if osinfo-defaults.properties fails 
to parse
......................................................................

packaging: fail the build if osinfo-defaults.properties fails to parse

check the properties file we ship with the exact code that checks it
at runtime when the engine loads.

this test is hooked into the packaging process and must fail it.

MISSING - make should invoke this test. didn't decide yet how to invoke
it from Makefile

Change-Id: I9aead46c067134dbc59b83ad70d1715ec004587c
Bug-Url: https://bugzilla.redhat.com/1056965
Signed-off-by: Roy Golan <[email protected]>
---
A packaging/pom.xml
A packaging/src/test/java/OsinfoTests.java
2 files changed, 48 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/23/33323/1

diff --git a/packaging/pom.xml b/packaging/pom.xml
new file mode 100644
index 0000000..6e4f755
--- /dev/null
+++ b/packaging/pom.xml
@@ -0,0 +1,28 @@
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.ovirt.engine</groupId>
+        <artifactId>root</artifactId>
+        <version>3.6.0-SNAPSHOT</version>
+    </parent>
+
+    <name>Packaging</name>
+    <artifactId>packaging</artifactId>
+    <groupId>org.ovirt.engine</groupId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.ovirt.engine.core</groupId>
+            <artifactId>utils</artifactId>
+            <version>${engine.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>conf</directory>
+            </resource>
+        </resources>
+    </build>
+</project>
diff --git a/packaging/src/test/java/OsinfoTests.java 
b/packaging/src/test/java/OsinfoTests.java
new file mode 100644
index 0000000..644a42a
--- /dev/null
+++ b/packaging/src/test/java/OsinfoTests.java
@@ -0,0 +1,20 @@
+import org.junit.Test;
+import org.ovirt.engine.core.utils.osinfo.OsinfoPropertiesParser;
+
+public class OsinfoTests {
+
+    public static final String OSINFO_DEFAULTS_PROPERTIES = 
"osinfo-defaults.properties";
+
+    @Test
+    public void parse() {
+
+        try {
+            OsinfoPropertiesParser.parse(
+                    
this.getClass().getClassLoader().getResource(OSINFO_DEFAULTS_PROPERTIES).getPath());
+        } catch (Exception e) {
+            System.err.println("Ovirt-engine will fail to load with a broken 
osinfo properties file.");
+            System.err.println("Please fix the properties file or Osinfo.g4 
grammer under org.ovirt.engine.core.utils.");
+            throw e;
+        }
+    }
+}


-- 
To view, visit http://gerrit.ovirt.org/33323
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9aead46c067134dbc59b83ad70d1715ec004587c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to