Skip to contentSkip to conversation

testexport.bbclass: Update to use python3

PATCH New [email protected] 1 participant 1 message Jun 2, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 testexport.bbclass: Update to use python3

From: Mariano Lopez <[email protected]>

Remove deprecated attributes in order to use python3.

runexported was changed to use python3.

[YOCTO #9702]

---
 meta/classes/testexport.bbclass | 4 ++--
 meta/lib/oeqa/runexported.py    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/classes/testexport.bbclass +2 -2
index e06c668..51b7d93 100644
@@ -95,9 +95,9 @@ def exportTests(d,tc):
                     if not os.path.exists(target_folder):
                         shutil.copytree(foldername, target_folder)
         if not isfolder:
-            shutil.copy2(mod.filename, os.path.join(exportpath, "oeqa/runtime"))
+            shutil.copy2(mod.path, os.path.join(exportpath, "oeqa/runtime"))
     # copy __init__.py files
-    oeqadir = pkgutil.get_loader("oeqa").filename
+    oeqadir = os.path.dirname(pkgutil.get_loader("oeqa").path)
     shutil.copy2(os.path.join(oeqadir, "__init__.py"), os.path.join(exportpath, "oeqa"))
     shutil.copy2(os.path.join(oeqadir, "runtime/__init__.py"), os.path.join(exportpath, "oeqa/runtime"))
     # copy oeqa/oetest.py and oeqa/runexported.py
meta/lib/oeqa/runexported.py +1 -1
index 52c1171..f1366a6 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 
 # Copyright (C) 2013 Intel Corporation
Signature · 1 line
2.6.6