Roy Golan has uploaded a new change for review. Change subject: packaging:[ver2] fail the build if osinfo-defaults.properties fails to parse ......................................................................
packaging:[ver2] 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. Change-Id: Icaecda7d278fa898838f04547d5ab44e5ca6b3d9 Bug-Url: https://bugzilla.redhat.com/1056965 Signed-off-by: Roy Golan <[email protected]> --- M Makefile A build/validations/pom.xml A build/validations/src/test/java/org/ovirt/engine/build/validations/OsinfoValidationsTest.java M packaging/conf/osinfo-defaults.properties 4 files changed, 50 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/34959/1 diff --git a/Makefile b/Makefile index f65f05b..0865244 100644 --- a/Makefile +++ b/Makefile @@ -210,6 +210,7 @@ generated-files \ validations \ $(BUILD_FILE) \ + post-build-validations \ $(NULL) generated-files: $(GENERATED) @@ -231,6 +232,11 @@ $(BUILD_FILE): $(MAKE) maven +post-build-validations: + if [ "$(BUILD_VALIDATION)" != 0 ]; then \ + ( cd build/validations && $(MVN) clean test -Dosinfo.properties=../../packaging/conf/osinfo-defaults.properties ); \ + fi + clean: # Clean maven generated stuff: $(MVN) clean $(EXTRA_BUILD_FLAGS) diff --git a/build/validations/pom.xml b/build/validations/pom.xml new file mode 100644 index 0000000..92e12f1 --- /dev/null +++ b/build/validations/pom.xml @@ -0,0 +1,24 @@ +<project> + <modelVersion>4.0.0</modelVersion> + + <name>build-validations</name> + <artifactId>build-validations</artifactId> + <groupId>org.ovirt.engine.build</groupId> + <version>3.5.1-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>org.ovirt.engine.core</groupId> + <artifactId>utils</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.11</version> + <scope>test</scope> + </dependency> + </dependencies> + +</project> diff --git a/build/validations/src/test/java/org/ovirt/engine/build/validations/OsinfoValidationsTest.java b/build/validations/src/test/java/org/ovirt/engine/build/validations/OsinfoValidationsTest.java new file mode 100644 index 0000000..eb588a8 --- /dev/null +++ b/build/validations/src/test/java/org/ovirt/engine/build/validations/OsinfoValidationsTest.java @@ -0,0 +1,18 @@ +package org.ovirt.engine.build.validations; + +import org.junit.Test; +import org.ovirt.engine.core.utils.osinfo.OsinfoPropertiesParser; + +public class OsinfoValidationsTest { + + @Test + public void parse() throws Exception { + try { + OsinfoPropertiesParser.parse(System.getProperty("osinfo.properties")); + } 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; + } + } +} diff --git a/packaging/conf/osinfo-defaults.properties b/packaging/conf/osinfo-defaults.properties index 4210bc6..2ef1df7 100644 --- a/packaging/conf/osinfo-defaults.properties +++ b/packaging/conf/osinfo-defaults.properties @@ -50,7 +50,7 @@ os.other.resources.minimum.ram.value = 256 os.other.resources.maximum.ram.value = 64000 os.other.resources.minimum.disksize.value = 1 -os.other.resources.minimum.numberOsCpus.value = 1 +os.other.resources.minimum.numberOfCpus.value = 1 os.other.devices.display.protocols.value = qxl/qxl,vnc/cirrus os.other.devices.watchdog.models.value = i6300esb @@ -278,7 +278,7 @@ os.ubuntu_12_04.derivedFrom.value = other_linux os.ubuntu_12_04.resources.minimum.ram.value = 64 os.ubuntu_12_04.resources.minimum.disksize.value = 5120 -os.ubuntu_12_04.resources.minimum.numberOsCpus.value = 1 +os.ubuntu_12_04.resources.minimum.numberOfCpus.value = 1 os.ubuntu_12_10.id.value = 1253 os.ubuntu_12_10.name.value = Ubuntu Quantal Quetzal -- To view, visit http://gerrit.ovirt.org/34959 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaecda7d278fa898838f04547d5ab44e5ca6b3d9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Roy Golan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
