summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/modtool_disable.py
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-10-07 13:30:35 -0700
committerMarcus Müller <marcus@hostalia.de>2018-10-22 19:06:55 +0200
commit9449236cf7bf48f40b696edce68d81410d713489 (patch)
tree56052674fea45cb83a1291e6886a8154c97d1b15 /gr-utils/python/modtool/modtool_disable.py
parentea0ee503a144aaf07a684a2dfaac58c89dbdb78d (diff)
modtool: OOTs use Boost.UTF, CMake 3.8-Aware
- This is the same change that happened for the GNU Radio core - New OOTs will now have Boost.UTF-based unit tests - modtool will be able to handle both CppUnit-based OOTs as well as Boost.UTF-based ones; this change is backward-compatible
Diffstat (limited to 'gr-utils/python/modtool/modtool_disable.py')
-rw-r--r--gr-utils/python/modtool/modtool_disable.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gr-utils/python/modtool/modtool_disable.py b/gr-utils/python/modtool/modtool_disable.py
index 556b2e1ab2..3a105e407c 100644
--- a/gr-utils/python/modtool/modtool_disable.py
+++ b/gr-utils/python/modtool/modtool_disable.py
@@ -83,6 +83,9 @@ class ModToolDisable(ModTool):
ed.comment_out_lines(r'%s::suite\(\)' % fname_base, comment_str='//')
ed.write()
self.scm.mark_file_updated(self._file['qalib'])
+ elif self._info['version'] == '38':
+ fname_qa_cc = 'qa_{}.cc'.format(self._info['blockname'])
+ cmake.comment_out_lines(fname_qa_cc)
elif self._info['version'] == '36':
cmake.comment_out_lines('add_executable.*'+fname)
cmake.comment_out_lines('target_link_libraries.*'+os.path.splitext(fname)[0])
@@ -99,7 +102,7 @@ class ModToolDisable(ModTool):
print("Changing %s..." % self._file['swig'])
if nsubs > 1: # Need to find a single BLOCK_MAGIC
blockname = os.path.splitext(fname[len(self._info['modname'])+1:])[0]
- if self._info['version'] == '37':
+ if self._info['version'] in ('37', '38'):
blockname = os.path.splitext(fname)[0]
(swigfile, nsubs) = re.subn('(GR_SWIG_BLOCK_MAGIC2?.+%s.+;)' % blockname, r'//\1', swigfile)
if nsubs > 1:
@@ -112,7 +115,7 @@ class ModToolDisable(ModTool):
as well as the block magic """
swigfile = open(self._file['swig']).read()
blockname = os.path.splitext(fname[len(self._info['modname'])+1:])[0]
- if self._info['version'] == '37':
+ if self._info['version'] in ('37', '38'):
blockname = os.path.splitext(fname)[0]
swigfile = re.sub('(%include\s+"'+fname+'")', r'//\1', swigfile)
print("Changing %s..." % self._file['swig'])
@@ -133,7 +136,7 @@ class ModToolDisable(ModTool):
for subdir in self._subdirs:
if self._skip_subdirs[subdir]:
continue
- if self._info['version'] == '37' and subdir == 'include':
+ if self._info['version'] in ('37', '38') and subdir == 'include':
subdir = 'include/%s' % self._info['modname']
try:
cmake = CMakeFileEditor(os.path.join(subdir, 'CMakeLists.txt'))