kenherring / ablunit-test-runner

VSCode Extension to integrate OpenEdge ABLUnit tests via the native API
MIT License
4 stars 5 forks source link

Environment variables in openedge-project.json PROPATH not resolved #161

Closed chris-riddell35 closed 3 weeks ago

chris-riddell35 commented 3 months ago

I'm using an openedge-project.json file that looks like this:

{
    "name": "my-project",
    "version": "1.0",
    "oeversion": "12.2",
    "graphicalMode": false,
    "charset": "utf-8",
    "buildPath": [
      { "type": "source", "path": "my-project/src" },
      { "type": "source", "path": "my-project/tests" },
      { "type": "propath", "path": "${DLC}/tty/netlib/OpenEdge.Net.pl" },
      { "type": "propath", "path": "${DLC}/tty/OpenEdge.Core.pl" }
    ],
    "buildDirectory": "build",
    "numThreads": 1
}

When I run some unit tests, I'm seeing the following error:

Error = Error (ExecExcetion)
   Command failed: c:/Progress/12.2/oe/bin/_progres -b -p c:/Users/chrisr/.vscode/extensions/kherring.ablunit-test-runner-0.2.1/resources/ABLUnitCore-wrapper.p -basekey INI -ininame progress.ini -T c:/Users/chrisr/git/data-management-api -profile profile.options -param "CFG=ablunit.json" 2>&1

Unable to build type info for MyTest.cls: Could not find class or interface OpenEdge.Net.HTTP.StatusCodeEnum. (12886)
Unable to build type info for MyTest.cls: Could not find class or interface OpenEdge.Net.HTTP.StatusCodeEnum. (12886)

If I change the buildPath in openedge-project.json to replace the ${DLC} reference with a fully qualified path, such as "C:/Progress/12.2" then this problem disappears. Looks like the environment variable is just not being resolved.

kenherring commented 3 months ago

Thanks for the issue report, will look into it and report back.

PeterJudgeZA commented 3 months ago

I ran into this too ... even if I added DLC=/path/to/openedge into the ini file.