From 9449236cf7bf48f40b696edce68d81410d713489 Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Sun, 7 Oct 2018 13:30:35 -0700
Subject: 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
---
 gr-utils/python/modtool/modtool_disable.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'gr-utils/python/modtool/modtool_disable.py')

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'))
-- 
cgit v1.2.3