[Fuego] [PATCH 12/29] generic_parser.py: update to the new parser interface

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Fri Jul 21 08:02:03 UTC 2017


This parser is used for tests that do not have their own parser
(e.g.: most functional tests) and it just reports the result
of the test as a single PASS or FAIL value.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/scripts/generic_parser.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/engine/scripts/generic_parser.py b/engine/scripts/generic_parser.py
index b6412b8..ecd0985 100755
--- a/engine/scripts/generic_parser.py
+++ b/engine/scripts/generic_parser.py
@@ -1,11 +1,12 @@
 #!/bin/python
-# sys.argv[1]: 0 (PASS) or 1 (FAIL)
 import os
 import sys
 sys.path.insert(0, os.environ['FUEGO_CORE'] + '/engine/scripts/parser')
 import common as plib
 
-print "Received: " + str(sys.argv[1])
-cur_dict = {'fail_or_pass' : sys.argv[1]}
-sys.exit(plib.process_data(test_results=cur_dict, label='PASS=0 FAIL=1'))
+RETURN_VALUE=os.environ['RETURN_VALUE']
 
+results = {}
+results['default.Functional'] = "PASS" if int(RETURN_VALUE) == 0 else "FAIL"
+
+sys.exit(plib.process_data(results))
-- 
2.7.4




More information about the Fuego mailing list