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

[Feature Request]: Copying/installing the built 'make check' suite to a directory #54

Closed
cblc opened this issue Jun 29, 2023 · 5 comments

Comments

@cblc
Copy link

cblc commented Jun 29, 2023

Describe the Feature

When cross-compiling to Windows (for example from either Linux or MacOS to Windows, using mingw-w64), I'd like to be able to run the make check suite in a Windows guest in a VM. For this to be possible, I'd need that the tests executables and scripts be copied (or installed) to a given directory, which I could have set up as a shared folder with a virtual machine.

The current behaviour when you cross-compile and issue a make check, is that all test programs are built, but then they are executed (which obviously fails, as you are cross compiling).

If your build system was plain Makefiles, I'd happily volunteer to implement this feature, but I have no Autotools knowledge, so I'm afraid I cannot help writing it.

Perhaps a good way of implementing this would be to add a switch to configure, so that when that switch is present, all the test programs are built but not executed, and are also installed when you do a make install. The only problem I see is that I'm not sure if the main script that runs all tests could be saved as a normal script file or if you are running all the tests directly from the Makefile generated by configure.

Expected Complications

No response

Will I try to implement this new feature?

No

@thesamesam
Copy link
Member

Please see the discussion in #52.

@cblc
Copy link
Author

cblc commented Jun 29, 2023

Great, thank you very much!

Does the test suite consist in invoking the following executables, or do I need to invoke them in some special way, or are there perhaps other scripts to run? (these executables are what I get in the tests directory when building to 32bit Windows with mingw-w64)

tests/create_compress_files.exe	tests/test_check.exe		tests/test_hardware.exe		tests/test_lzip_decoder.exe	tests/test_vli.exe
tests/test_bcj_exact_size.exe	tests/test_filter_flags.exe	tests/test_index.exe		tests/test_memlimit.exe
tests/test_block_header.exe	tests/test_filter_str.exe	tests/test_index_hash.exe	tests/test_stream_flags.exe

@cblc
Copy link
Author

cblc commented Jun 30, 2023

Everything clear, I think. I have created this batch file which, AFAIK, runs all the tests that can be run from cross-compilation.

There's an extra step, though, before running this batch file, and it's that you must copy the complete files folder (located under the tests folder in the source code) into the built tests folder, for the script to run:

test_bcj_exact_size.exe || exit /b
test_block_header.exe || exit /b
test_check.exe || exit /b
test_filter_flags.exe || exit /b
test_filter_str.exe || exit /b
test_hardware.exe || exit /b
test_index.exe || exit /b
test_index_hash.exe || exit /b
test_lzip_decoder.exe || exit /b
test_memlimit.exe || exit /b
test_stream_flags.exe || exit /b
test_vli.exe || exit /b

@cblc
Copy link
Author

cblc commented Jun 30, 2023

You are free to close this issue, unless you feel that something could be added. Thank you very much!!

@JiaT75
Copy link
Contributor

JiaT75 commented Jul 17, 2023

Thanks @cblc for reporting this! We had a similar report recently (mentioned by @thesamesam) so we made a much needed update to the INSTALL file. I hope this update helps you and future users with similar questions.

Larhzu pushed a commit that referenced this issue Jul 18, 2023
The new Tests section describes basic information about the tests, how
to run them, and important details when cross compiling. We have had a
few questions about how to compile the tests without running them, so
hopefully this information will help others with the same question in the
future.

Fixes: #54
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

No branches or pull requests

3 participants