superbol-studio-oss icon indicating copy to clipboard operation
superbol-studio-oss copied to clipboard

Run tests of gixsql in CI with the new preprocessor

Open Halbaroth opened this issue 1 year ago • 2 comments

This PR adds the tests of gixsql (https://github.com/OcamlPro/gixsql) in the CI of Superbol. As you can check on my fork (https://github.com/Halbaroth/superbol-studio-oss/pull/1), only 43 out of 69 tests succeed.

How it works:

  • Nix creates an appropriate environment to compile gixsql and run its tests.
  • A script run_test.sh located in the gixsql repository set up a complete test environment based on environment variables from a nix shell. This environment includes a PostgreSQL server that will run on localhost:6666.
  • A wrapper of this script is present in the folder scripts/ of this repository. As run_test.sh fails if it isn't into an appropriate nix shell, this wrapper disables this script if nix is not on your computer.
  • An action is called in the github workflow to install Nix.

Several caveats apply to the approach of this PR:

  • I import the project gixsql.
  • I install the latest release of GnuCOBOL in the Nix unstable channel, which means we do not test the preprocessor with the current development version of GnuCOBOL.
  • If you have another PostgreSQL server on your machine which listen to localhost:6666, you will got an error with make test.

Currently, I active the verbosity mode of gixsql test runner, so the make test command produces a huge output. I plan to fix this soon.

This PR is rebased on #370.

Halbaroth avatar Oct 18 '24 11:10 Halbaroth

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 18 '24 11:10 CLAassistant

Like #375, this PR shall remain a draft until #370 is merged.

nberth avatar Oct 24 '24 07:10 nberth