bugfix: Qemu shared dir failure 87/22387/1
authorMartin Klozik <martinx.klozik@intel.com>
Fri, 23 Sep 2016 11:04:01 +0000 (12:04 +0100)
committerMartin Klozik <martinx.klozik@intel.com>
Fri, 23 Sep 2016 13:06:57 +0000 (14:06 +0100)
In case of testpmd or l2fwd loopback app, VSPERF copies
sources if these tools into qemu shared folder. Maximum
size of folder content is limited to approx. 500MB. This
limit is exceeded in case that DPDK is built for multiple
RTE_TARGETs. Unnecessary files are excluded from the
copy to spare size inside shared folder.

JIRA: VSPERF-398

Change-Id: Iab31a6ff2397f7031eae6a95d424317c3343d4d9
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Bill Michalowski <bmichalo@redhat.com>
Reviewed-by: Antonio Fischetti <antonio.fischetti@intel.com>
testcases/testcase.py

index 06e9cd2..ccd6578 100644 (file)
@@ -380,8 +380,20 @@ class TestCase(object):
         guest_loopback = set(S.getValue('GUEST_LOOPBACK'))
         if 'testpmd' in guest_loopback:
             try:
-                tasks.run_task(['rsync', '-a', '-r', '-l', r'--exclude="\.git"',
-                                os.path.join(S.getValue('TOOLS')['dpdk_src'], ''),
+                # exclude whole .git/ subdirectory and all o-files;
+                # It is assumed, that the same RTE_TARGET is used in both host
+                # and VMs; This simplification significantly speeds up testpmd
+                # build. If we will need a different RTE_TARGET in VM,
+                # then we have to build whole DPDK from the scratch in VM.
+                # In that case we can copy just DPDK sources (e.g. by excluding
+                # all items obtained by git status -unormal --porcelain).
+                # NOTE: Excluding RTE_TARGET directory won't help on systems,
+                # where DPDK is built for multiple targets (e.g. for gcc & icc)
+                exclude = []
+                exclude.append(r'--exclude=.git/')
+                exclude.append(r'--exclude=*.o')
+                tasks.run_task(['rsync', '-a', '-r', '-l'] + exclude +
+                               [os.path.join(S.getValue('TOOLS')['dpdk_src'], ''),
                                 os.path.join(guest_dir, 'DPDK')],
                                self._logger,
                                'Copying DPDK to shared directory...',