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

Clean up compilation build files #27

Open
avborup opened this issue Sep 2, 2021 · 2 comments
Open

Clean up compilation build files #27

avborup opened this issue Sep 2, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@avborup
Copy link
Owner

avborup commented Sep 2, 2021

Either automatically delete the file at exe_path or add a post_test-like command to the config (command that runs after a test is complete).

@avborup avborup added the enhancement New feature or request label Sep 2, 2021
@avborup avborup changed the title Clean up compilation output Clean up compilation build files Sep 4, 2021
@RishiKumarRay
Copy link

do we have to add this in Github Actions?

@avborup
Copy link
Owner Author

avborup commented Mar 9, 2022

do we have to add this in Github Actions?

No, this would be something that kitty does while/after running kitty test. The two solutions I suggest would be as follows:

Proposal 1

A after_test_command field can be added to each language in the kitty.yml file. Assume we use Java - it would be nice to automatically remove any built .class file. An example config could be

- name: Java
  file_extension: java
  compile_command: javac $SRC_PATH
  run_command: java -cp $DIR_PATH $SRC_FILE_NAME_NO_EXT
  # Below is new (not implemented)
  after_test_command: find . -name "*.class" -type f -delete

Proposal 2

The code automatically removes the file at EXE_PATH (whose value is generated when parsing the config file) after the test runner has completed.

I prefer proposal 1, because it makes it far easier to customise on a per-language basis.

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

No branches or pull requests

2 participants