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

Re-implement test execution with CTest #149

Merged
merged 1 commit into from
May 11, 2022
Merged

Conversation

kratz00
Copy link
Contributor

@kratz00 kratz00 commented Apr 5, 2022

Still WIP.

I just wanted to show what I am working on, as you asked about Git LFS in #148

In your CMake workspace run ctest
This PR should enable to run the tests cross platform.

TODO:

  • convert the missing tests
  • make it more robust
  • add clean up code (delete extract files)
Test project /tmp/ub
    Start 1: avigomanager_new_compression
1/9 Test #1: avigomanager_new_compression .......   Passed    0.01 sec
    Start 2: avigomanager_old_compression
2/9 Test #2: avigomanager_old_compression .......   Passed    0.07 sec
    Start 3: avigomanager_hashes_match
3/9 Test #3: avigomanager_hashes_match ..........   Passed    0.03 sec
    Start 4: baldurs_gate_new_compression
4/9 Test #4: baldurs_gate_new_compression .......   Passed    0.25 sec
    Start 5: baldurs_gate_old_compression
5/9 Test #5: baldurs_gate_old_compression .......***Exception: SegFault  0.98 sec
    Start 6: baldurs_gate_hashes_match
6/9 Test #6: baldurs_gate_hashes_match ..........   Passed    0.08 sec
    Start 7: the-feeble-files_new_compression
7/9 Test #7: the-feeble-files_new_compression ...   Passed    0.04 sec
    Start 8: the-feeble-files_old_compression
8/9 Test #8: the-feeble-files_old_compression ...   Passed    0.23 sec
    Start 9: the-feeble-files_hashes_match
9/9 Test #9: the-feeble-files_hashes_match ......   Passed    0.08 sec

89% tests passed, 1 tests failed out of 9

Label Time Summary:
avigomanager        =   0.11 sec*proc (3 tests)
baldurs_gate        =   1.31 sec*proc (3 tests)
the-feeble-files    =   0.36 sec*proc (3 tests)

Total Test time (real) =   1.79 sec

The following tests FAILED:
	  5 - baldurs_gate_old_compression (SEGFAULT)
Errors while running CTest
Output from these tests are in: /tmp/ub/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

Btw, trying to extract the Baldurs Gate Cab using the old compression switch crashes unshield (did not look into it yet).

@twogood
Copy link
Owner

twogood commented Apr 6, 2022

Cool. Much neater with CTest.

@twogood
Copy link
Owner

twogood commented Apr 6, 2022

Tests should run either with old compression or new, never both as only one should work.

@kratz00 kratz00 changed the title ctest wip Re-implement test execution with CTest Apr 11, 2022
@kratz00 kratz00 force-pushed the citest branch 3 times, most recently from cc39acd to 93213e1 Compare April 11, 2022 21:12
@kratz00 kratz00 marked this pull request as ready for review April 12, 2022 18:51
@kratz00
Copy link
Contributor Author

kratz00 commented Apr 12, 2022

A lot of code duplication (something which can be improved in the future), but so far it should work to extract the Zip files, run the actual tests and clean up afterwards. It should work an all platforms which are supported by CMake, so it should be possible to run the tests on Windows in the future too (once #145 respectively #141 have been taken care of).

I will have a look why unshield is crashing with the Baldurs Gate test files using the old compression.

@kratz00 kratz00 requested a review from twogood April 13, 2022 08:03
@kratz00 kratz00 force-pushed the citest branch 4 times, most recently from a83716c to 039a0af Compare May 2, 2022 19:04
@kratz00
Copy link
Contributor Author

kratz00 commented May 11, 2022

@twogood I disabled the crashing test for now (see issue #156) to unblock this pull request.

@twogood twogood mentioned this pull request May 11, 2022
@twogood twogood merged commit 005b9d0 into twogood:main May 11, 2022
@twogood
Copy link
Owner

twogood commented May 11, 2022

Great work!

@kratz00 kratz00 deleted the citest branch May 11, 2022 20:33
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.

2 participants