Permalink
Browse files

Fix for NPE on DlcHome + PCTCompile (#335)

  • Loading branch information...
gquerret committed Jan 18, 2019
1 parent ec7abbf commit dc66f29fda4d93d76403dab0a6c12f2c9e3c73fb
@@ -39,6 +39,7 @@ public CompilationWrapper() {
@Override
public void execute() {
PCT pctTask;
checkDlcHome();
// Handle pct:compile_ext
if ("pctcompileext".equalsIgnoreCase(getRuntimeConfigurableWrapper().getElementTag())
|| "pct:compile_ext"
@@ -60,9 +61,7 @@ public void execute() {
pctTask.addEnv(var);
}
pctTask.bindToOwner(this);
if (getDlcHome() != null) {
pctTask.setDlcHome(getDlcHome());
}
pctTask.setDlcHome(getDlcHome());
pctTask.setIncludedPL(getIncludedPL());
pctTask.execute();
}
@@ -1160,6 +1160,15 @@ public void test74() {
assertTrue(new File(BASEDIR + "test74/build/test.r").exists());
}

@Test(groups = {"v10"})
public void test75() {
configureProject(BASEDIR + "test75/build.xml");
executeTarget("test");

File f = new File(BASEDIR + "test75/build/test.r");
assertTrue(f.exists());
}

@Test(groups = {"v10"})
public void test101() {
configureProject(BASEDIR + "test101/build.xml");
@@ -1175,4 +1175,14 @@ public void test74() {
executeTarget("test");
assertTrue(new File(BASEDIR + "test74/build/test.r").exists());
}

@Test(groups = {"v10"})
public void test75() {
configureProject(BASEDIR + "test75/build.xml");
executeTarget("test");

File f = new File(BASEDIR + "test75/build/test.r");
assertTrue(f.exists());
}

}
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<project name="PCTCompile-test75">
<taskdef resource="PCT.properties" />
<DlcHome value="${DLC}" />

<target name="test">
<mkdir dir="build" />
<!-- DLC should be inherited from DlcHome task -->
<PCTCompile graphicalMode="false" destDir="build">
<fileset dir="src" includes="*.p" />
<Profiler enabled="${PROFILER}" coverage="true" outputDir="profiler" />
</PCTCompile>
</target>

</project>
@@ -0,0 +1,2 @@
MESSAGE "Hello world!".
RETURN "0".

0 comments on commit dc66f29

Please sign in to comment.