When running DTS with a git revision specified the following error occurs:
$ ./main.py --revision HEAD
[...]
FileNotFoundError: [Errno 2] No such file or directory:
     'dts/<framework.utils.DPDKGitTarball object at 0x78f69e73a5c0>'

Fix by casting DPDKGitTarball to Path, in order to stringify it correctly.

Bugzilla ID: 1496
Fixes: a23f22457dbd ("dts: constrain DPDK source argument")

Signed-off-by: Alex Chapman <[email protected]>
Reviewed-by: Jack Bond-Preston <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
---
Hello,
Sending this fix to a bug that i discovered.

Best Regards,
Alex
---
 .mailmap                  | 1 +
 dts/framework/settings.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 3f3f0442e5..a326e8e553 100644
--- a/.mailmap
+++ b/.mailmap
@@ -46,6 +46,7 @@ Aleksey Baulin <[email protected]>
 Aleksey Katargin <[email protected]>
 Ales Musil <[email protected]>
 Alessio Igor Bogani <[email protected]>
+Alex Chapman <[email protected]>
 Alexander Bechikov <[email protected]>
 Alexander Belyakov <[email protected]>
 Alexander Chernavin <[email protected]>
diff --git a/dts/framework/settings.py b/dts/framework/settings.py
index f95876113f..f6303066d4 100644
--- a/dts/framework/settings.py
+++ b/dts/framework/settings.py
@@ -415,7 +415,7 @@ def get_settings() -> Settings:
     args = parser.parse_args()
 
     if args.dpdk_revision_id:
-        args.dpdk_tarball_path = DPDKGitTarball(args.dpdk_revision_id, 
args.output_dir)
+        args.dpdk_tarball_path = Path(DPDKGitTarball(args.dpdk_revision_id, 
args.output_dir))
 
     args.test_suites = _process_test_suites(parser, args.test_suites)
 
-- 
2.34.1

Reply via email to