1 Reply Latest reply on Dec 28, 2004 3:57 PM by ryan.campbell

    Overriding predefined junit properties when running function

    Ovidiu Feodorov Master

      Sometimes during local test runs I want to be able to override predefined properties, in a flexible manner.

      Example: During a command line functional test run (tests/build.xml), I want to send the test output to stdout and also I want my entire build to fail if at least one test fails.

      This is simple to achieve if I set junit.formatter.usefile=false and junit.haltonfailure=true. However, this values come predefined (through a series of imports, the values that take precedence are those from jboss-head/tools/etc/buildmagic/task.properties) and they can only be overridden on command line using -Dpropname=value

      Is there an already existing way to specify these overrides, short of listing them on the command line?

      If it isn't, a possibility would be to list them in a local build.properties file and the build script to generate -D flags based on its content. The properties will be overridden only when the build is initiated by the build.sh script.

      I changed JBossMessaging tests/build.sh to behave this way. If you think it is an useful mechanism, we could integrate it in the generic build