You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several unrelated papercuts made the integration/test-runner flow
unreliable in CI. This folds the fixes into one scope (MDL test runner
+ docker pathing) since they were discovered together while chasing
the same green build.
Test-runner and generator:
- `varPattern` / `assignPattern` now match on any line in the test
body (added `(?m)` flag and tightened anchoring). Without this,
multi-line test cases saw `$var = CREATE ...` silently left
un-rewritten, which then failed the compiled microflow with
"variable is not declared".
- Drop the `isSideEffectStatement` / auto-`ON ERROR CONTINUE` wrapping
for DELETE/COMMIT/CHANGE. The blanket wrap hid actual test failures
behind silent passes; if a test wants tolerant error handling it can
write it explicitly.
- `runner.Run` now ensures the `.docker/` stack exists before building
or restarting (new `ensureDockerStack` helper that calls
`docker.Init` on demand). Previously a fresh checkout with no
`.docker/docker-compose.yml` failed with a raw `stat` error before
any test ran.
Docker layer:
- `resolveMxBuild` / `ResolveMxForVersion` now accept a preferred
project version and prefer exact-match cached binaries over the
lexicographically-last glob entry (which sorted Mendix 9 after 11).
`AnyCachedMxBuildPath` and the MxBuild downloader share the new
`newestVersionedPath` helper that parses `[major,minor,patch,build]`
numerically.
- `findPADDir` / `isPADDir` recognise the already-extracted layout
(`app/`, `bin/`, `etc/`, `lib/`) produced by newer PAD outputs where
the Dockerfile is not emitted.
- `Check` resolves the project's version from the MPR reader and
passes it through, so check-on-build uses the same `mx` binary the
project was last built against.
Microflow builder type inference:
- `flowBuilder.lookupMicroflowReturnType` walks the raw microflow unit
to fetch the return type of a called microflow. When the builder
knows the return type, `registerResultVariableType` records it in
`varTypes` with qualified entity name, so subsequent CHANGE /
attribute-access activities on the returned variable resolve
correctly. This is what lets tests like
`$Product = CALL MfTest.M012_CreateEntity();
CHANGE $Product SET Price = 10.0;` validate without forcing the
test author to re-declare the variable type.
Makefile / scripts:
- `make test-mdl` now goes through `scripts/run-mdl-tests.sh`, which
copies the project into a temp directory before running the
bootstrap MDL + test spec. The old direct invocation mutated the
repo's seed `app.mpr`, so re-running the target picked up stale
state.
Regression tests:
- `TestFindPADDir_ExtractedLayoutInRoot` for the new PAD layout
- generator tests cover the multiline assign pattern
- builder-type test uses `MockBackend.ListMicroflowsFunc` to assert
that a subsequent CHANGE resolves against the returned entity
0 commit comments