GMUEClab / ecj

ECJ Evolutionary Computation Toolkit
http://cs.gmu.edu/~eclab/projects/ecj/
123 stars 42 forks source link

Unable to build on Windows due to test failures #62

Closed remz1337 closed 3 years ago

remz1337 commented 4 years ago

Hello, I'm trying to build this library on Windows 10 with Maven 3 and Java 1.8 but some tests are failing.

I have identified the root causes:

Thanks

SigmaX commented 4 years ago

Hi Rémi,

Interesting point about the Python call. That's an example app I recently added that is designed specifically to run external shell commands as part of fitness evaluation. It's not immediately obvious to me how to make it platform-independent—perhaps we should consider omitting it from the main test suite.

I admit that our lab doesn't often test on Windows, focusing on Linux and macOS.

remz1337 commented 4 years ago

Hello, yes either omit it from the main test suite or do a check if python is installed first

SigmaX commented 3 years ago

Fixed the unit tests that use UNIX-specific paths like /dev/null and /tmp. They now run on Windows.

I could not reproduce the SimpleConstructionRuleTest failure on my Windows 10 VM.

Leaving the example that invokes Python as-is, since the example is meant to demonstrate invoking an external application, and I can't think of a simpler alternative. I considered disabling that test, but it's in the System test suite for a reason. I'm leaving it in for now for the test coverage it gives us, though this does unfortunately still mean it breaks on a typical Windows install.

remz1337 commented 3 years ago

Thanks alot! Yes I agree it makes more sense to keep the Python test. It's pretty obvious why it would fail if you don't have Python installed