Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XGAP testing framework #16

Merged
merged 4 commits into from
Feb 16, 2022
Merged

XGAP testing framework #16

merged 4 commits into from
Feb 16, 2022

Conversation

RussWoodroofe
Copy link
Contributor

Per discussion in this issue, this pull request adds a single new file under the new tst directory. The new file defines a function which loads GAP in package ("-p") mode (including loading the XGAP GAP library) and runs a single specified command.

Main update over the version posted for discussion at the issue is commenting. The correct commenting style to use in XGAP wasn't completely clear to me, and this may require adjustment.

This framework loads a new instance of GAP run with the -p flag, parses and responds to XGAP queries about fonts and colors, and waits until GAP is ready for input.  It then runs a single command, waits until GAP is ready for input (or error input) again, and then closes the child GAP -p instance.

All output from the GAP -p instance goes to stdout.  The package mode codes are parse and properly displayed: the output should look like that of a normal GAP instance.
@RussWoodroofe
Copy link
Contributor Author

Apologies for slowness in creating the PR. GAP Days left me with several urgent things to catch up on!

@olexandr-konovalov
Copy link
Member

olexandr-konovalov commented Mar 4, 2021

Thanks @RussWoodroofe ! We have some packages switching already to GitHub actions - e.g. gap-packages/example#29, it would be nice if we can use the same setup, and have a .tst file which reads your .g file, runs it and should produce output as expected. I can help with adding GitHub actions here.

@RussWoodroofe
Copy link
Contributor Author

@alex-konovalov, makes sense. Can certainly wait until after the upcoming release.

If I understand right, a good general structure on the GAP end would probably be to add to PackageInfo.g a "tst.testall.g" file. The testall.g file should Read this file, and run GAP -p with a command that runs some actual tests, possibly TestDirectory(xgap/tst).

@olexandr-konovalov
Copy link
Member

@RussWoodroofe yes, exactly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants