[PATCH v1] framework: Add makefile deprecation warning

ohilyard at iol.unh.edu ohilyard at iol.unh.edu
Wed Jan 26 20:52:00 CET 2022


From: Owen Hilyard <ohilyard at iol.unh.edu>

Adds the following deprecation warning to DTS when running a makefile
build:

Makefile builds have been deprecated and will be removed in the next release.
Please switch to using meson builds.

Signed-off-by: Owen Hilyard <ohilyard at iol.unh.edu>
---
 framework/dts.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/framework/dts.py b/framework/dts.py
index 892aa1fc..1baddb84 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -35,6 +35,7 @@ import copy  # copy module for duplicate variable
 import imp
 import inspect  # load attribute
 import json  # json format
+import logging
 import os  # operation system module
 import re  # regular expressions module
 import signal  # signal module for debug mode
@@ -77,7 +78,7 @@ stats_report = None
 log_handler = None
 
 
-def dts_parse_param(config, section):
+def dts_parse_param(config, section, log_handler):
     """
     Parse execution file parameters.
     """
@@ -94,11 +95,16 @@ def dts_parse_param(config, section):
 
     parameters = config.get(section, 'parameters').split(':')
     drivername = config.get(section, 'drivername').split('=')[-1]
-    # get the build method, default is makefile
+    # get the build method, default is meson
     try:
         buildtype = config.get(section, 'build_type').split('=')[-1]
     except:
         buildtype = 'meson'
+
+    if buildtype == 'makefile':
+        log_handler.warning("Makefile builds have been deprecated and will be removed in the next release.")
+        log_handler.warning("Please switch to using meson builds.")
+
     buildtype = buildtype.lower()
     settings.save_global_setting(settings.HOST_BUILD_TYPE_SETTING, buildtype)
 
@@ -588,7 +594,7 @@ def run_all(config_file, pkgName, git, patch, skip_setup,
     # for all Execution sections
     for section in config.sections():
         crbInsts = list()
-        dts_parse_param(config, section)
+        dts_parse_param(config, section, log_handler)
 
         # verify if the delimiter is good if the lists are vertical
         duts, targets, test_suites = dts_parse_config(config, section)
-- 
2.30.2



More information about the dts mailing list