Skip to contentSkip to conversation

oescripts.py: fix typo

PATCH New Chen Qi 1 participant 2 messages Jul 1, 2020

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/2 oescripts.py: fix typo

---
 meta/lib/oeqa/selftest/cases/oescripts.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/oescripts.py +1 -1
index 2f18d8f29c..f697d29b50 100644
@@ -177,7 +177,7 @@ class OEListPackageconfigTests(OEScriptTests):
 
         self.check_endlines(results, expected_endlines)
 
-    def test_packageconfig_flags_optiins_preferred_only(self):
+    def test_packageconfig_flags_options_preferred_only(self):
         results = runCmd('%s/contrib/list-packageconfig-flags.py -p' % self.scripts_dir)
         expected_endlines = []
         expected_endlines.append("RECIPE NAME                  PACKAGECONFIG FLAGS")
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/2 oescripts: ignore whitespaces when comparing lines

list-packageconfig-flags.py determines the whitespace numbers according to the longest package name. This is reasonable for the tool as it's trying to generate pretty output.

However, in this selftest case, the output is hardcoded. This results in
"pinentry gtk2 libcap ncurses qt secret" not recognized
as correct as the expected line is:
"pinentry gtk2 libcap ncurses qt secret".

The difference is only about whitespaces. So we should ignore the whitespaces when comparing lines.

---
 meta/lib/oeqa/selftest/cases/oescripts.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/oescripts.py +1 -1
index f697d29b50..726daff7c6 100644
@@ -133,7 +133,7 @@ class OEListPackageconfigTests(OEScriptTests):
     def check_endlines(self, results,  expected_endlines): 
         for line in results.output.splitlines():
             for el in expected_endlines:
-                if line == el:
+                if line.split() == el.split():
                     expected_endlines.remove(el)
                     break
 
Signature · 1 line
2.17.1