Hi,
Now, The VDSM test unit is expected to run in a un-installed enviornment and use hackVDSM() to fake modules importing. hackVDSM() is pretty tricky for other modules to be added because of the dependency order. I would propose to run the VDSM unit tests in a installed VDSM path which is the same path as other VDSM runnable binaries. By this way, we can abandon hackVDSM() and run the unit test normally. On the other hand, the VDSM building script installs the VDSM files to <home>/builder by default, it is reasonable to start the VDSM unit test after all parts of the building script finishes. Any comments about this idea?
On Thu, Mar 07, 2013 at 02:18:35PM +0800, Shu Ming wrote:
Hi,
Now, The VDSM test unit is expected to run in a un-installed enviornment and use hackVDSM() to fake modules importing. hackVDSM() is pretty tricky for other modules to be added because of the dependency order. I would propose to run the VDSM unit tests in a installed VDSM path which is the same path as other VDSM runnable binaries. By this way, we can abandon hackVDSM() and run the unit test normally. On the other hand, the VDSM building script installs the VDSM files to <home>/builder by default, it is reasonable to start the VDSM unit test after all parts of the building script finishes. Any comments about this idea?
I prefer Vinzenz's take on a git repo reorganization. http://gerrit.ovirt.org/#/c/11858/
There's an ongoing attempt to reach a consensus on that, though I must admit we are a bit stuck.
Hey Shu, Personally when I run specific unit test I prefer to run it without installing vdsm package, means locally from my development directory. I develop on my major machine and install the package on testing environments for verification, so during the development if I write some uts, I want to be able to run them fast and easy and continue. Using installed vdsm is more for functional tests in my opinion.
By the way, currently the tests can run both in installed and uninstalled environment.. and I agree about the trickiness of hackVDSM
Maybe running only after install is better practice but I'm not sure, we need more opinions about that issue..
----- Original Message ----- From: "Shu Ming" shuming@linux.vnet.ibm.com To: "VDSM Project Development" vdsm-devel@lists.fedorahosted.org Sent: Thursday, March 7, 2013 8:18:35 AM Subject: [vdsm] VDSM test unit running path
Hi,
Now, The VDSM test unit is expected to run in a un-installed enviornment and use hackVDSM() to fake modules importing. hackVDSM() is pretty tricky for other modules to be added because of the dependency order. I would propose to run the VDSM unit tests in a installed VDSM path which is the same path as other VDSM runnable binaries. By this way, we can abandon hackVDSM() and run the unit test normally. On the other hand, the VDSM building script installs the VDSM files to <home>/builder by default, it is reasonable to start the VDSM unit test after all parts of the building script finishes. Any comments about this idea?
on 03/11/2013 14:56, Yaniv Bronheim wrote:
Hey Shu, Personally when I run specific unit test I prefer to run it without installing vdsm package, means locally from my development directory. I develop on my major machine and install the package on testing environments for verification, so during the development if I write some uts, I want to be able to run them fast and easy and continue. Using installed vdsm is more for functional tests in my opinion.
By the way, currently the tests can run both in installed and uninstalled environment.. and I agree about the trickiness of hackVDSM
Maybe running only after install is better practice but I'm not sure, we need more opinions about that issue..
Hi Yaniv. I agree with you on running tests fast and easy. I also think make install to ~/builder is fast and easy enough for me. I can accept run unit test in ~/builder and we can create script to automate this process. Before the git repo re-organization is ready, we can get rid of hackVDSM by running tests in ~/builder.
Hi, I never used the autobuilder.sh script so i never really saw or used the ~/builder directory.. how does running the tests from there supposed to work? how does it help to omit the hack? and how does the re-organization effect here?
----- Original Message ----- From: "Zhou Zheng Sheng" zhshzhou@linux.vnet.ibm.com To: "VDSM Project Development" vdsm-devel@lists.fedorahosted.org Cc: "Yaniv Bronheim" ybronhei@redhat.com Sent: Wednesday, March 13, 2013 6:25:46 AM Subject: Re: [vdsm] VDSM test unit running path
on 03/11/2013 14:56, Yaniv Bronheim wrote:
Hey Shu, Personally when I run specific unit test I prefer to run it without installing vdsm package, means locally from my development directory. I develop on my major machine and install the package on testing environments for verification, so during the development if I write some uts, I want to be able to run them fast and easy and continue. Using installed vdsm is more for functional tests in my opinion.
By the way, currently the tests can run both in installed and uninstalled environment.. and I agree about the trickiness of hackVDSM
Maybe running only after install is better practice but I'm not sure, we need more opinions about that issue..
Hi Yaniv. I agree with you on running tests fast and easy. I also think make install to ~/builder is fast and easy enough for me. I can accept run unit test in ~/builder and we can create script to automate this process. Before the git repo re-organization is ready, we can get rid of hackVDSM by running tests in ~/builder.
on 03/13/2013 19:36, Yaniv Bronheim wrote:
Hi, I never used the autobuilder.sh script so i never really saw or used the ~/builder directory.. how does running the tests from there supposed to work? how does it help to omit the hack? and how does the re-organization effect here?
autobuild.sh invokes autogen.sh to prepare the project to be installed under the prefix of ~/builder. Then make and make install will actually generate and copy the files there. The directory structure under the ~/builder is the same as when it is installed to / . You can find ~/builder/bin, ~/builder/etc, ~/builder/lib64, ~/builder/var and so on. For unit test, we needn't start VDSM from ~/builder, we just need a directory tree that is similar to /. In this way hackVDSM can be removed.
The re-organization is not a problem. After the re-organization, VDSM installed under / should work of cause, so ut on the ~/builder will work as well, because the structure under the ~/builder is the same as /.
----- Original Message ----- From: "Zhou Zheng Sheng" zhshzhou@linux.vnet.ibm.com To: "VDSM Project Development" vdsm-devel@lists.fedorahosted.org Cc: "Yaniv Bronheim" ybronhei@redhat.com Sent: Wednesday, March 13, 2013 6:25:46 AM Subject: Re: [vdsm] VDSM test unit running path
on 03/11/2013 14:56, Yaniv Bronheim wrote:
Hey Shu, Personally when I run specific unit test I prefer to run it without installing vdsm package, means locally from my development directory. I develop on my major machine and install the package on testing environments for verification, so during the development if I write some uts, I want to be able to run them fast and easy and continue. Using installed vdsm is more for functional tests in my opinion.
By the way, currently the tests can run both in installed and uninstalled environment.. and I agree about the trickiness of hackVDSM
Maybe running only after install is better practice but I'm not sure, we need more opinions about that issue..
Hi Yaniv. I agree with you on running tests fast and easy. I also think make install to ~/builder is fast and easy enough for me. I can accept run unit test in ~/builder and we can create script to automate this process. Before the git repo re-organization is ready, we can get rid of hackVDSM by running tests in ~/builder.
vdsm-devel@lists.fedorahosted.org