Fsu0413 / openssl-externalCMake

A totally external CMake project for building OpenSSL.
http://openssl.org
The Unlicense
12 stars 3 forks source link

Alternative test method #2

Open Fsu0413 opened 1 year ago

Fsu0413 commented 1 year ago

I think I should find alternative method for implementing make check for this project.

On 1.0.2 branch I rewrote all the cases. They are easy to rewrite since they are just written using Bourne Shell (on Linux / macOS), which is existing knowledge for me. I only rewrote the logic using CMake and it's done. But thing is different on 1.1.1 or later where it is written using Perl, which is unfourtunately not what I currently understand. Also I don't think this is necessary since I am just reinventing the wheel.

Thing is I can't just use the original test cases since they depends on the original OpenSSL configuration file configdata.pm, which is generated by Configure. So the question is how to easily implement make check.

Following solutions available but I have not decided what is the easiest for me.

  1. Generate configdata.pm using CMake, with hand-crafted exported template and run original test cases
  2. Manually reconstruct the build command line and generate configdata.pm using Configure and run original test cases
  3. Manually reconstruct the build command line and build separately another OpenSSL using the original Perl-based instruction, and compare the generated binary files (need investigation for byte to byte consistent)
  4. Manually reconstruct the build command line and build separately another OpenSSL using the original Perl-based instruction, but replace the binary and generated header files to the build result from my CMake project and run the original test cases

All these methods need investigation...

Fsu0413 commented 1 year ago

For 3: CMake currently doesn't provide an API for getting the path of object files. They said that the path of object files are implementation detail.