Skip to content
Permalink
Browse files

OpenEdge 12 support

  • Loading branch information...
gquerret committed Aug 5, 2017
1 parent cea34fb commit 33f9115b0b4a6c8a5895c9c508ad305b66259c80
Showing with 5,511 additions and 125 deletions.
  1. +16 −8 Jenkinsfile
  2. +61 −18 build.xml
  3. +2 −0 pct.build.properties
  4. +3 −0 src/java/com/phenix/pct/CompilationWrapper.java
  5. +3 −1 src/java/com/phenix/pct/PCT.java
  6. +10 −0 src/java/com/phenix/pct/PCTRun.java
  7. +154 −0 src/java/com/phenix/pct/ProgressV12.java
  8. +69 −0 src/java/com/phenix/pct/ProgressV12.properties
  9. +53 −70 src/java/com/phenix/pct/RCodeInfo.java
  10. +2 −2 src/java/com/phenix/pct/RCodeSelector.java
  11. +4 −4 src/java/eu/rssw/pct/standalone/Prolib.java
  12. +6 −6 src/progress/Consultingwerk/Util/ClassHelper.cls
  13. +2,835 −0 src/progress/pct/v12/_dmpincr12.p
  14. +540 −0 src/progress/pct/v12/_dmputil12.p
  15. +26 −0 src/progress/pct/v12/dmpUsers.p
  16. +724 −0 src/progress/pct/v12/dump_inc.p
  17. +147 −0 src/progress/pct/v12/dynrun.p
  18. +55 −0 src/progress/pct/v12/loadData1.p
  19. +78 −0 src/progress/pct/v12/loadData2.p
  20. +168 −0 src/progress/pct/v12/loadSch.p
  21. +27 −0 src/progress/pct/v12/loadUsers.p
  22. +37 −0 src/progress/pct/v12/restoreTableContent.p
  23. +36 −0 src/progress/pct/v12/silentIncDump.p
  24. +110 −0 src/progress/pct/v12/xrefd0004.i
  25. +86 −0 src/progress/prodict/dictvar12.i
  26. +63 −0 src/progress/prodict/dump/dmptrail12.i
  27. +73 −0 src/progress/prodict/dump/dumpvars12.i
  28. +1 −1 src/progress/prodict/sec/sec-pol.i
  29. +83 −0 src/progress/prodict/user/uservar12.i
  30. +4 −4 src/test/com/phenix/pct/OEUnitTest.java
  31. +12 −0 src/test/com/phenix/pct/PCTCreateBaseTest.java
  32. +1 −1 src/test/com/phenix/pct/PCTRunTest.java
  33. +3 −3 src/test/com/phenix/pct/ProUnitTest.java
  34. +3 −3 src/test/com/phenix/pct/RCodeInfoTest.java
  35. +10 −2 tests.xml
  36. +1 −1 tests/PCTRun/test37/build.xml
  37. +1 −1 tests/PCTRun/test37/test1.p
  38. +4 −0 tests/RCodeInfo/test1/src/crc.p
@@ -4,10 +4,11 @@ stage('Class documentation build') {

def antHome = tool name: 'Ant 1.9', type: 'hudson.tasks.Ant$AntInstallation'
def dlc11 = tool name: 'OpenEdge-11.7', type: 'jenkinsci.plugin.openedge.OpenEdgeInstallation'
def dlc12 = tool name: 'OpenEdge-12.0', type: 'jenkinsci.plugin.openedge.OpenEdgeInstallation'
def jdk = tool name: 'JDK8', type: 'hudson.model.JDK'

withEnv(["JAVA_HOME=${jdk}"]) {
bat "${antHome}\\bin\\ant -DDLC11=${dlc11} classDoc"
bat "${antHome}\\bin\\ant -DDLC11=${dlc11} -DDLC12=${dlc12} classDoc"
}
stash name: 'classdoc', includes: 'dist/classDoc.zip'
}
@@ -24,23 +25,26 @@ stage('Standard build') {
def dlc10 = tool name: 'OpenEdge-10.2B', type: 'jenkinsci.plugin.openedge.OpenEdgeInstallation'
def dlc10_64 = tool name: 'OpenEdge-10.2B-64b', type: 'jenkinsci.plugin.openedge.OpenEdgeInstallation'
def dlc11 = tool name: 'OpenEdge-11.7', type: 'jenkinsci.plugin.openedge.OpenEdgeInstallation'
def dlc12 = tool name: 'OpenEdge-12.0', type: 'jenkinsci.plugin.openedge.OpenEdgeInstallation'

unstash name: 'classdoc'
withEnv(["TERM=xterm"]) {
sh "${antHome}/bin/ant -DDLC10=${dlc10} -DDLC10-64=${dlc10_64} -DDLC11=${dlc11} -DGIT_COMMIT=${commit} dist"
sh "${antHome}/bin/ant -DDLC10=${dlc10} -DDLC10-64=${dlc10_64} -DDLC11=${dlc11} -DDLC12=${dlc12} -DGIT_COMMIT=${commit} dist"
}
stash name: 'tests', includes: 'dist/testcases.zip,tests.xml'
archiveArtifacts 'dist/PCT.jar,dist/PCT-javadoc.jar,dist/PCT-sources.jar'
}
}

stage('Full tests') {
parallel branch8: { testBranch('windows', 'OpenEdge-10.2B', false, '10.2-Win', 10, 32) },
branch1: { testBranch('windows', 'OpenEdge-11.7', true, '11.7-Win', 11, 32) },
branch4: { testBranch('linux', 'OpenEdge-10.2B-64b', false, '10.2-64-Linux', 10, 64) },
branch5: { testBranch('linux', 'OpenEdge-11.6', false, '11.6-Linux', 11, 64) },
branch6: { testBranch('linux', 'OpenEdge-11.7', false, '11.7-Linux', 11, 64) },
branch7: { testBranch('linux', 'OpenEdge-10.2B', false, '10.2-Linux', 10, 32) },
parallel branch1: { testBranch('windows', 'OpenEdge-10.2B', false, '10.2-Win', 10, 32) },
branch2: { testBranch('windows', 'OpenEdge-11.7', true, '11.7-Win', 11, 32) },
branch3: { testBranch('linux', 'OpenEdge-10.2B-64b', false, '10.2-64-Linux', 10, 64) },
branch4: { testBranch('linux', 'OpenEdge-11.6', false, '11.6-Linux', 11, 64) },
branch5: { testBranch('linux', 'OpenEdge-11.7', false, '11.7-Linux', 11, 64) },
branch6: { testBranch('linux', 'OpenEdge-10.2B', false, '10.2-Linux', 10, 32) },
branch7: { testBranch('linux', 'OpenEdge-12.0', false, '12.0-Linux', 12, 64) },
branch8: { testBranch('windows', 'OpenEdge-12.0', false, '12.0-Win', 12, 64) },
failFast: false
node('linux') {
// Wildcards not accepted in unstash...
@@ -50,13 +54,17 @@ stage('Full tests') {
unstash name: 'junit-10.2-64-Linux'
unstash name: 'junit-11.6-Linux'
unstash name: 'junit-11.7-Linux'
unstash name: 'junit-12.0-Linux'
unstash name: 'junit-12.0-Win'
sh "mkdir junitreports"
unzip zipFile: 'junitreports-10.2-Win.zip', dir: 'junitreports'
unzip zipFile: 'junitreports-11.7-Win.zip', dir: 'junitreports'
unzip zipFile: 'junitreports-10.2-Linux.zip', dir: 'junitreports'
unzip zipFile: 'junitreports-10.2-64-Linux.zip', dir: 'junitreports'
unzip zipFile: 'junitreports-11.6-Linux.zip', dir: 'junitreports'
unzip zipFile: 'junitreports-11.7-Linux.zip', dir: 'junitreports'
unzip zipFile: 'junitreports-12.0-Linux.zip', dir: 'junitreports'
unzip zipFile: 'junitreports-12.0-Win.zip', dir: 'junitreports'
junit 'junitreports/**/*.xml'
}
}
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<project name="PCT" default="dist">
<project name="PCT" default="dist" xmlns:if="ant:if" xmlns:unless="ant:unless">

<property environment="env" />

@@ -9,6 +9,7 @@
<isset property="DLC10" />
<isset property="DLC10-64" />
<isset property="DLC11" />
<isset property="DLC12" />
</and>
</condition>

@@ -27,7 +28,9 @@
<property name="build-v10" location="build/build-v10" />
<property name="build-v10-64" location="build/build-v10-64" />
<property name="build-v11" location="build/build-v11" />
<property name="build-win" location="build/windows" />
<property name="build-v12" location="build/build-v12" />
<property name="build-win-v11" location="build/windows-v11" />
<property name="build-win-v12" location="build/windows-v12" />
<property name="doc" location="doc" />
<property name="dist" location="dist" />

@@ -49,29 +52,38 @@
<include name="pct/v11/*.p" />
<include name="rssw/**/*.cls" />
</fileset>
<fileset id="fs.v12" dir="${src.progress}">
<include name="pct/*.p" />
<exclude name="pct/pctOEUnitRunner.p" />
<include name="pct/v12/*.p" />
<include name="rssw/**/*.cls" />
</fileset>
<fileset id="fs.classDoc" dir="${src.progress}">
<include name="Consultingwerk/**/*.cls" />
<include name="Consultingwerk/**/*.p" />
</fileset>

<!-- Different propath depending on version -->
<path id="pp.v8">
<pathelement location="${src.progress}" />
<pathelement location="${src.progress}" />
</path>
<path id="pp.v9">
<pathelement location="${src.progress}" />
<pathelement location="${src.progress}" />
</path>
<path id="pp.v10">
<pathelement location="${src.progress}" />
<pathelement location="lib/OEUnit_dlc10.pl" />
<pathelement location="${src.progress}" />
<pathelement location="lib/OEUnit_dlc10.pl" />
</path>
<path id="pp.v10-64">
<pathelement location="${src.progress}" />
<pathelement location="lib/OEUnit_dlc10-64.pl" />
<pathelement location="${src.progress}" />
<pathelement location="lib/OEUnit_dlc10-64.pl" />
</path>
<path id="pp.v11">
<pathelement location="${src.progress}" />
<pathelement location="lib/OEUnit_dlc11.pl" />
<pathelement location="${src.progress}" />
<pathelement location="lib/OEUnit_dlc11.pl" />
</path>
<path id="pp.v12">
<pathelement location="${src.progress}" />
</path>

<!-- Classpath for PCT compilation -->
@@ -107,12 +119,14 @@
<mkdir dir="${build-v10-64}" />
<mkdir dir="${build-v11}" />
<mkdir dir="${doc}" />
<mkdir dir="${build-v12}" />
<mkdir dir="${dist}" />

<!-- Checking v10 and v11 availability -->
<available file="${DLC10}/version" property="dlc.v10.present" />
<available file="${DLC10-64}/version" property="dlc.v10-64.present" />
<available file="${DLC11}/version" property="dlc.v11.present" />
<available file="${DLC12}/version" property="dlc.v12.present" />

<echo message="Version tag : ${pct.version.string}" />
<echo file="${src.java}/com/phenix/pct/PCT.properties">PCTVersion=${pct.version.string}</echo>
@@ -207,6 +221,7 @@
<echo message="Checking v10 in ${DLC10}" />
<echo message="Checking v10-64 in ${DLC10-64}" />
<echo message="Checking v11 in ${DLC11}" />
<echo message="Checking v12 in ${DLC12}" />

<antcall target="cond.pbuild">
<param name="build.this.version" value="dlc.v10.present" />
@@ -238,29 +253,52 @@
<param name="xmlxref" value="true" />
</antcall>

<antcall target="cond.pbuild">
<param name="build.this.version" value="dlc.v12.present" />
<param name="dlcHome" value="${DLC12}" />
<param name="buildDir" value="${build-v12}" />
<param name="libName" value="pct12.pl" />
<param name="fsid" value="fs.v12" />
<param name="propid" value="pp.v12" />
<param name="xmlxref" value="true" />
</antcall>

<zip destfile="${build}/pct-src.zip">
<fileset dir="${src.progress}" includes="**/*" excludes="Consultingwerk/Studio/ClassDocumentation/Templates/resources/**/*" />
</zip>
</target>

<target name="classDoc" depends="declare-bootstrap" description="Windows compilation of class documentation">
<mkdir dir="${build-win}" />
<bootstrapCompile destdir="${build-win}" md5="true" minSize="false" graphicalMode="true" dlcHome="${DLC11}" includedPL="false" cpstream="iso8859-1" debugListing="true" listing="true" relativePaths="true" requireFullNames="true" requireFieldQualifiers="true">
<mkdir dir="${build-win-v11}" />
<bootstrapCompile destdir="${build-win-v11}" md5="true" minSize="false" graphicalMode="true" dlcHome="${DLC11}" includedPL="false" cpstream="iso8859-1" debugListing="true" listing="true" relativePaths="true" requireFullNames="true" requireFieldQualifiers="true">
<fileset refid="fs.classDoc" />
<propath>
<pathelement location="${src.progress}" />
</propath>
<PCTRunOption name="-cprcodeout" value="undefined" />
</bootstrapCompile>

<mkdir dir="${build-win-v12}" />
<bootstrapCompile destdir="${build-win-v12}" md5="true" minSize="false" graphicalMode="true" dlcHome="${DLC12}" includedPL="false" cpstream="iso8859-1" debugListing="true" listing="true" relativePaths="true" requireFullNames="true" requireFieldQualifiers="true">
<fileset refid="fs.classDoc" />
<propath>
<pathelement location="${src.progress}" />
</propath>
<PCTRunOption name="-cprcodeout" value="undefined" />
</bootstrapCompile>

<zip destFile="${dist}/classDoc.zip">
<fileset dir="${build-win}" />
<zipfileset dir="${build-win-v11}" prefix="v11" includes="**/*.r" />
<zipfileset dir="${build-win-v12}" prefix="v12" includes="**/*.r" />
</zip>
</target>

<target name="fakeClassDoc" unless="classDocOK">
<echo message="Generating fake classDoc.zip file" />
<echo file="${dist}/empty.txt" />
<zip destFile="${dist}/classDoc.zip" whenEmpty="create">
<fileset dir="." includes="leave.it.empty" />
<zipfileset dir="${dist}" includes="empty.txt" prefix="v11" />
<zipfileset dir="${dist}" includes="empty.txt" prefix="v12" />
</zip>
</target>

@@ -269,13 +307,17 @@
<resourceexists><file file="${dist}/classDoc.zip" /></resourceexists>
</condition>
<antcall target="fakeClassDoc" />
<!-- Updating pct11.pl with rcode compiled on Windows -->

<!-- Updating pct11.pl and pct12.pl with rcode compiled on Windows -->
<mkdir dir="classDocTemp" />
<copy todir="classDocTemp">
<zipfileset src="dist/classDoc.zip" includes="**/*.r" />
<zipfileset src="dist/classDoc.zip" />
</copy>
<bootstrapLibrary destfile="${build}/pct11.pl" dlcHome="${DLC11}" encoding="undefined">
<fileset dir="classDocTemp" />
<bootstrapLibrary destfile="${build}/pct11.pl" dlcHome="${DLC11}" encoding="undefined" if:true="${dlc.v11.present}">
<fileset dir="classDocTemp/v11" includes="**/*.r" />
</bootstrapLibrary>
<bootstrapLibrary destfile="${build}/pct12.pl" dlcHome="${DLC12}" encoding="undefined" if:true="${dlc.v12.present}">
<fileset dir="classDocTemp/v12" includes="**/*.r" />
</bootstrapLibrary>
<delete dir="classDocTemp" />

@@ -288,6 +330,7 @@
<include name="pct10.pl" />
<include name="pct10-64.pl" />
<include name="pct11.pl" />
<include name="pct12.pl" />
<include name="pct-src.zip" />
</fileset>
<fileset dir="${src.java}">
@@ -1,3 +1,5 @@
DLC10=\\
DLC10-64=\\
DLC11=C:\\Progress\\OpenEdge-11.7
DLC12=\\

@@ -38,6 +38,9 @@ public CompilationWrapper() {

@Override
public void execute() {
// Assert DLC correctly set in parent task
checkDlcHome();

PCT pctTask;
checkDlcHome();
// Handle pct:compile_ext
@@ -104,7 +104,9 @@ public final void setDlcHome(File dlcHome) {
throw new BuildException(caught);
}

if (version.compareTo(new DLCVersion(11, 7, "0")) >= 0)
if (version.compareTo(new DLCVersion(12, 0, "0")) >= 0)
this.pp = new ProgressV12();
else if (version.compareTo(new DLCVersion(11, 7, "0")) >= 0)
this.pp = new ProgressV117();
else if (version.compareTo(new DLCVersion(11, 4, "0")) >= 0)
this.pp = new ProgressV114();
@@ -411,6 +411,13 @@ public void execute() {
throw new BuildException("Unable to extract pct.pl.");
}

// OE12 ? Define failOnError and resultProperty
if (getDLCMajorVersion() >= 12) {
exec.setFailonerror(runAttributes.isFailOnError());
if (runAttributes.getResultProperty() != null)
exec.setResultProperty(runAttributes.getResultProperty());
}

exec.execute();
} catch (BuildException be) {
cleanup();
@@ -438,6 +445,9 @@ public void execute() {
}
}

if (getDLCMajorVersion() >= 12)
return;

// Now read status file
try (Reader r = new FileReader(status); BufferedReader br = new BufferedReader(r)) {
String s = br.readLine();
Oops, something went wrong.

0 comments on commit 33f9115

Please sign in to comment.
You can’t perform that action at this time.