I'm trying to develop a cross-platform library and want to be able to develop code and then quickly test it on both Windows and Linux. I'm not sure if it's even an option or worthwhile testing under Wine (it uses the multiprocessing
module, and COM on Windows) but I do have a VM I've been running it under. It's just been cumbersome getting the code copied over to the Windows machine running on a remote server using the Windows GUI (which is slow enough over the network as it is) after every change, then bringing up the command prompt and running the tests, then troubleshooting on Windows and getting the fixes back to the development environment.
Is there any way I can remove some steps from the tes开发者_如何转开发ting process?
Using a DVCS to push the local changes to the server will take you far. You will need a SSH server on the Windows machine, but there are several of those around. You can also use a makefile to direct the pushing and testing, possibly even running the tests remotely depending on what they consist of.
Windows does have the Server Core variant which provides a command shell without the "GUI" ( http://www.microsoft.com/windowsserver2008/en/us/r2-compare-core-installation.aspx )
I would say you also automate the process. Have a personal (?) build server, have powershell scripts or chef recipes ( http://www.opscode.com/blog/2011/05/24/chef-hearts-windows/ ). Push the changes ( ideally Git), have the build server pick it up, spin up the VM if needed, do the stuff, get the result
Whatever happens, if you're developing for multiple platforms you're going to have to copy from whichever you're developing on to the secondary platform(s), build it and instigate your tests.
Your best bet is to automate as much of it as possible (for both environments) and make a build bot which watches for new code on a central repository (you are using version control aren't you?).
If the Windows version is giving you most hassle then why not develop on Windows and set up the build bot on your linux machine?
精彩评论