From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Cc: "xu,huilong" <huilongx.xu@intel.com>
Subject: [dts] [PATCH 2/4] add compile config file template and parse compile config class
Date: Sat, 1 Apr 2017 15:42:30 +0800 [thread overview]
Message-ID: <1491032552-118473-3-git-send-email-huilongx.xu@intel.com> (raw)
In-Reply-To: <1491032552-118473-1-git-send-email-huilongx.xu@intel.com>
please see commens in compile.cfg for how to config compile switch.
parse result:
{'seesion_name1': {'COMPILE_SWITCH1': 'n',
'COMPILE_SWITCH1': 'n',
'compile_app': ['app1:app1_path', 'app2'],
'suite_list': ['testsuite1', 'test_suite2']},
'session_name2': {'COMPILE_SWITCH1': 'RTE_LOG_DEBUG',
'compile_app': ['app1:app1_path'],
'suite_list': ['testsuite1']
'patch_list': ['patch_file1', 'patch_file2']}
}
Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
conf/compile.cfg | 30 ++++++++++++++++++++++++++++++
framework/config.py | 21 ++++++++++++++++++++-
2 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 conf/compile.cfg
diff --git a/conf/compile.cfg b/conf/compile.cfg
new file mode 100644
index 0000000..81290ee
--- /dev/null
+++ b/conf/compile.cfg
@@ -0,0 +1,30 @@
+#compile switch config
+#[sessionname]
+#suite_list means which suite should update compile switch or use patch for re-compile dpdk
+#this must config. when we run this suite dts will auto update switch or apply patch and re-compile
+#dpdk. finish compile, will generate RTE_TARGET_sessionname for save compile result.
+#suite_list=suite1,suite2
+#compile_app means which example should compile, excep testpmd,test_piple,test, test_acl. because dts will auto compile app.
+#app1 means example folder name, if you config build result path after app name(must use ":" split) dts will copy exampe to RTE_TARGET folder
+#compile_app=app1:compile app1 target path, app2
+#patch_list means use dpdk patch for test, it not must
+#patch_list=patchfile1,patchfile2
+#COMPILE_SWITCH means which compile suite switch should update, it must in conf/compile_base in RTE_SDK path,
+#we have a compile_base in dts conf path
+#COMPILE_SWITCH1=switch value
+
+[example]
+suite_list=suite1,suite2
+compile_app=app1:compile app1 targte path,app2
+patch_list=pactfile1,pactchfile2
+COMPILE_SWITCH1=switch value
+COMPILE_SWITCH2=switch value
+COMPILE_SWITCH3=switch value
+COMPILE_SWITCH4=switch value
+[log_level]
+suite_list=coremask
+#compile_app=coremask
+CONFIG_RTE_LOG_LEVEL=RTE_LOG_DEBUG
+[queue_start_stop]
+suite_list=queue_start_stop
+patch_list=macfwd_log.patch
diff --git a/framework/config.py b/framework/config.py
index 6c3a3b0..dd72c55 100644
--- a/framework/config.py
+++ b/framework/config.py
@@ -43,7 +43,7 @@ PORTCONF = "conf/ports.cfg"
CRBCONF = "conf/crbs.cfg"
VIRTCONF = "conf/virt_global.cfg"
IXIACONF = "conf/ixia.cfg"
-
+COMPILECONF = "conf/compile.cfg"
class UserConf():
@@ -301,6 +301,25 @@ class IxiaConf(UserConf):
return self.ixia_cfg
+class CompileConf(UserConf):
+ def __init__(self, compile_conf=COMPILECONF):
+ self.config_file = compile_conf
+ self.compile_cfg = {}
+ self.compile_config = UserConf(self.config_file)
+ def load_compile_cfg(self):
+ sections = self.compile_config.get_sections()
+ for name in sections:
+ self.compile_cfg[name] = {}
+ compile_switch = self.compile_config.load_section(name)
+ for conf in compile_switch:
+ key, value = conf
+ if key in ['suite_list', 'compile_app', 'patch_list']:
+ suite_lists = value.strip().split(',')
+ self.compile_cfg[name][key] = suite_lists
+ else:
+ self.compile_cfg[name][key.upper()] = value
+ return self.compile_cfg
+
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description="Load DTS configuration files")
--
1.9.3
next prev parent reply other threads:[~2017-04-01 7:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-01 7:42 [dts] [PATCH 0/4] compile dpdk different config with different test suite by dts framework befor run test suite xu,huilong
2017-04-01 7:42 ` [dts] [PATCH 1/4] add dpdk all compile switch xu,huilong
2017-04-01 8:02 ` Liu, Yong
2017-04-01 7:42 ` xu,huilong [this message]
2017-04-01 7:42 ` [dts] [PATCH 3/4] read compile switch config and compile dpdk before test xu,huilong
2017-04-01 7:42 ` [dts] [PATCH 4/4] add example for test suite xu,huilong
2017-04-01 8:20 ` [dts] [PATCH 0/4] compile dpdk different config with different test suite by dts framework befor run " Liu, Yong
2017-04-01 8:31 ` Xu, HuilongX
2017-04-01 8:54 ` Liu, Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1491032552-118473-3-git-send-email-huilongx.xu@intel.com \
--to=huilongx.xu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).