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

Port instrumented.sh testing to python #5583

Closed

Conversation

Disservin
Copy link
Member

@Disservin Disservin commented Sep 10, 2024

Since an unknown amount of time the instrumented CI has been a bit flawed, explained here #5185. It also experiences random timeout issues where restarting the workflow fixes it or very long run times (more than other workflows) and is not very portable.

The intention of this PR is to propose a port to python which also works on other operating systems.
It should also be relatively easy for beginners to add new tests to assert stockfish's output and to run it.
From the source directory the following command can be run, to run the unit tests.
python3 ../tests/instrumented.py --none ./stockfish.

A test runner will go over the test suites and run the test cases. Producing an output which looks like this
image

All instrumented tests should have been ported over.
I think the required python version for this is 3.7, testing.py includes some infrastructure code which setups the testing.

No functional change

@vondele
Copy link
Member

vondele commented Sep 10, 2024

nice, any particular requirements/packages to use this or all standard library?

@Disservin
Copy link
Member Author

nice, any particular requirements/packages to use this or all standard library?

Apart from the python version requirement that i listed, no. All packages should be standard ones

@Disservin Disservin force-pushed the python-testing-pr branch 2 times, most recently from 16bf7a2 to 1aa8d0c Compare September 10, 2024 22:30
Since an unknown amount of time the instrumented CI has been a bit
flawed, explained here
official-stockfish#5185. It also
experiences random timeout issues where restarting the workflow fixes it
or very long run times (more than other workflows) and is not very
portable.

The intention of this commit is to port the instrumented.sh to python
which also works on other operating systems. It should also be
relatively easy for beginners to add new tests to assert stockfish's
output and to run it.
From the source directory the following command can be run.

`python3 ../tests/instrumented.py --none ./stockfish`

A test runner will go over the test suites and run the test cases.

All instrumented tests should have been ported over.
The required python version for this is should be 3.7 (untested),
testing.py includes some infrastructure code which setups the testing.

fixes official-stockfish#5185
closes official-stockfish#5583

No functional change
@Disservin Disservin marked this pull request as ready for review September 14, 2024 13:34
@Disservin Disservin changed the title [RFC] Port instrumented.sh testing to python Port instrumented.sh testing to python Sep 17, 2024
@Disservin Disservin added the to be merged Will be merged shortly label Sep 17, 2024
@Disservin Disservin closed this in a06e700 Sep 17, 2024
@Disservin
Copy link
Member Author

requires the package requests because of some ssl problems on windows

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

Successfully merging this pull request may close these issues.

2 participants