Skip to content
clement-brodu edited this page Jul 30, 2024 · 15 revisions

How to build

Create a pct.build.properties in the parent directory.

DLC10=D:\\Openedge\\OE102B
#DLC10-64=\\
DLC11=D:\\Openedge\\OE11.7.19\x86
DLC12=D:\\Openedge\\OE12.8.2\\x64

Remove pct in the %ANT_HOME%/lib if exists.

Create build_pct.bat in parent directory :

REM go in PCT dir
cd pct

REM copy pct.build.properties
xcopy ..\pct.build.properties pct.build.properties /y

REM set variables
for /f %%i in ('git rev-parse HEAD') do set curr_com=%%i
for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set curr_bran=%%i

call ant -Denv.BRANCH_NAME=%curr_bran% -DGIT_COMMIT=%curr_com% -Dpct.release=226 clean classDoc jar > ../build_pct.log

How to test

Create test_pct.bat in parent directory :

set TEST_DLC=D:\Openedge\OE12.8.2\x64

set PROMSGS=%TEST_DLC%\prolang\eng\promsgs.eng
set ANT_OPTS=-Duser.language=en -Duser.country=US -Xmx1G -Xms512m 
set JAVA_TOOL_OPTIONS=-Duser.language=en -Duser.country=US

cd pct

call ant prepare-test
call ant -Duser.language=en -Duser.country=US -D"DLC=%TEST_DLC%" -DPROFILER=true -lib dist/PCT.jar -file tests.xml test

To execute only some tests:

  • change the include value of classfileset in test.xml file

How to test only one task

Create single_test_pct.bat in parent directory

You will have to :

  • change the TEST_** variables
set TEST_CLASS=PCTCompileExt
set TEST_DIR=test27
set TEST_TARGET=test

set TEST_DLC=D:\Openedge\OE12.8.2\x64

set PROMSGS=%TEST_DLC%\prolang\eng\promsgs.eng
set ANT_OPTS=-Duser.language=en -Duser.country=US -Xmx1G -Xms512m 
set JAVA_TOOL_OPTIONS=-Duser.language=en -Duser.country=US

set PCT_JAR=%~dp0pct\dist\PCT.jar

robocopy pct\tests\%TEST_CLASS%\%TEST_DIR% pct\testbox\%TEST_CLASS%\%TEST_DIR% /MIR
if %TEST_CLASS% == PCTCompileExt (
    robocopy pct\tests\PCTCompile\%TEST_DIR% pct\testbox\%TEST_CLASS%\%TEST_DIR% /MIR
)

cd pct\testbox\%TEST_CLASS%\%TEST_DIR%

REM launch
call ant -Duser.language=en -Duser.country=US -D"DLC=%TEST_DLC%" -DPROFILER=true -lib %PCT_JAR% -file build.xml %TEST_TARGET%

REM open explorer
explorer .

Liste des modifications par rapport au code d'origine :

PctRcode

Vérifier que le .r a bien été généré par PCT en se basant sur le timestamp du .inc associé.

Si le .inc n'existe pas, on considère que le fichier est à recompiler.

Test unitaire : Test79specif

Pour l'activer : pctRcode="true"

    <PCTCompile graphicalMode="false" destDir="build" dlcHome="${DLC}" failOnError="false" pctRcode="true">
      <fileset dir="src" includes="*.p" />
    </PCTCompile>

Compatibilité OE10

Rendre PCT compatible avec la version Openedge 10.2B.

Pipeline simplifié

Création d'un pipeline de génération Jenkins simplifié.

Compilation dans un répertoire temporaire

Compiler les classes dans un répertoire temporaire pour éviter les .r invalides lors des compilations multi threads.