Skip to content

Commit

Permalink
ResultProperty attribute in PCTCompile (#321)
Browse files Browse the repository at this point in the history
Issue #320
  • Loading branch information
gquerret committed Sep 18, 2018
1 parent 15b6a1e commit f3d5891
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/progress/pct/pctCompile.p
Expand Up @@ -96,7 +96,7 @@ INPUT STREAM sFileset CLOSE.
MESSAGE STRING(iCompOK) + " file(s) compiled".
IF (iCompFail GE 1) THEN
MESSAGE "Failed to compile " iCompFail " file(s)".
RETURN (IF (iCompFail GT 0) AND failOnErr THEN '10' ELSE '0').
RETURN (IF iCompFail GT 0 THEN '10' ELSE '0').

PROCEDURE logError.
DEFINE INPUT PARAMETER ipMsg AS CHARACTER NO-UNDO.
Expand Down
10 changes: 10 additions & 0 deletions src/test/com/phenix/pct/PCTCompileExtTest.java
Expand Up @@ -1142,6 +1142,16 @@ public void test72() {
executeTarget("build");
}

// ResultProperty is meaningless in multi-threaded builds
@Test(enabled=false, groups = {"v10"})
public void test73() {
configureProject(BASEDIR + "test73/build.xml");
executeTarget("test1");
assertPropertyEquals("test73Result1", "10");
executeTarget("test2");
assertPropertyEquals("test73Result2", "0");
}

@Test(groups = {"v10"})
public void test101() {
configureProject(BASEDIR + "test101/build.xml");
Expand Down
9 changes: 9 additions & 0 deletions src/test/com/phenix/pct/PCTCompileTest.java
Expand Up @@ -1158,4 +1158,13 @@ public void test72() {
// STOP condition raised by warning 4516 has to be trapped
executeTarget("build");
}

@Test(groups = {"v10"})
public void test73() {
configureProject(BASEDIR + "test73/build.xml");
executeTarget("test1");
assertPropertyEquals("test73Result1", "10");
executeTarget("test2");
assertPropertyEquals("test73Result2", "0");
}
}
19 changes: 19 additions & 0 deletions tests/PCTCompile/test73/build.xml
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<project name="PCTCompile-test73">
<taskdef resource="PCT.properties" />

<target name="test1">
<mkdir dir="build" />
<PCTCompile graphicalMode="false" destDir="build" dlcHome="${DLC}" failOnError="false" resultProperty="test73Result1">
<fileset dir="src" includes="*.p" />
<Profiler enabled="${PROFILER}" coverage="true" outputDir="profiler" />
</PCTCompile>
</target>

<target name="test2">
<PCTCompile graphicalMode="false" destDir="build" dlcHome="${DLC}" failOnError="false" resultProperty="test73Result2">
<fileset dir="src" includes="test2.p" />
<Profiler enabled="${PROFILER}" coverage="true" outputDir="profiler" />
</PCTCompile>
</target>
</project>
1 change: 1 addition & 0 deletions tests/PCTCompile/test73/src/test1.p
@@ -0,0 +1 @@
MESSGE "Hello world!".
1 change: 1 addition & 0 deletions tests/PCTCompile/test73/src/test2.p
@@ -0,0 +1 @@
MESSAGE "Hello world!".

0 comments on commit f3d5891

Please sign in to comment.