I managed to get the tests running with the following two patches .
Please review them .

-- vijay

On 9 April 2018 at 15:28, Vijay Kumar Banerjee <vijaykumar9...@gmail.com>
wrote:

>
>
> On Fri, 6 Apr 2018, 02:24 Vijay Kumar Banerjee, <vijaykumar9...@gmail.com>
> wrote:
>
>> I tried to solve the empty get in the way shown in the patch , but it
>> doesn't seems to work, I'm getting the following error now
>>
>> RTEMS Testing - Tester, 5 (1ed6e2e64090)
>> Traceback (most recent call last):
>>   File "/home/lunatic/development/rtems/rtems-tools/tester/rtems-test",
>> line 40, in <module>
>>     rt.test.run()
>>   File "/home/lunatic/development/rtems/rtems-tools/tester/rt/test.py",
>> line 303, in run
>>     bsp = config.load(bsp[1], opts)
>>   File "/home/lunatic/development/rtems/rtems-tools/tester/rt/config.py",
>> line 461, in load
>>     return opts.defaults['bsp']
>>   File "/home/lunatic/development/rtems/rtems-tools/rtemstoolkit/macros.py",
>> line 190, in __getitem__
>>     raise IndexError('key: %s' % (key))
>> IndexError: key: bsp
>>
>> I still Couldn't figure out why it's happening, when I use RawConfigParse
> , it seems to run nicely though .
>
> Any Ideas on solving it without using RawConfigParser ?
>
>
>> -- vijay
>>
>> On 5 April 2018 at 11:51, Cillian O'Donnell <cpodonne...@gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Wed, 4 Apr 2018, 11:18 Vijay Kumar Banerjee, <
>>> vijaykumar9...@gmail.com> wrote:
>>>
>>>> I got the rtems-test running
>>>>
>>>> I found that get_item_names(section, err) in configuration.py  was
>>>> returning an empty list to the
>>>> item_names in load(bsp,opts) for config.py this was giving out the
>>>> error mandatory item not found .
>>>>
>>>> I have attached the patch file .
>>>>
>>>> current status :
>>>> rtems-test is running without coverage
>>>>
>>>> running coverage gives the following error :
>>>>
>>>> RTEMS Testing - Tester, 5 (092c569e81ae)
>>>> Traceback (most recent call last):
>>>>   File "/home/lunatic/development/rtems/rtems-tools/tester/rtems-test",
>>>> line 40, in <module>
>>>>     rt.test.run()
>>>>   File "/home/lunatic/development/rtems/rtems-tools/tester/rt/test.py",
>>>> line 310, in run
>>>>     coverage = coverage_get_obj(opts, path_to_builddir[1])
>>>>   File "/home/lunatic/development/rtems/rtems-tools/tester/rt/test.py",
>>>> line 230, in coverage_get_obj
>>>>     coverage_obj = coverage.coverage_run(opts.defaults,
>>>> path_to_builddir)
>>>>   File "/home/lunatic/development/rtems/rtems-tools/tester/rt/coverage.py",
>>>> line 335, in __init__
>>>>     self.report_format = self.config_map['report_format'][2]
>>>>
>>>
>>> This is back to the difference in cfg formats. It's looking for the last
>>> line here
>>>
>>> https://github.com/cillianodonnell/rtems-tools/
>>> blob/coverage/tester/rtems/testing/bsps/leon3-qemu.mc
>>>
>>> Which is now
>>>
>>> https://github.com/cillianodonnell/rtems-tools/
>>> blob/ini-update/tester/rtems/testing/bsps/leon3_qemu.ini
>>>
>>> It's trying to grab the 'html' text so it can trigger the right section
>>> of code in coverage.py
>>>
>>> It's something just to tell which format we want the report to output
>>>
>>
>> Understood , I'll come to that after I manage to get the test running
>> first .
>>
>>>
>>> TypeError: 'NoneType' object has no attribute '__getitem__'
>>>>
>>>>
>>>> Thanks
>>>>
>>>> -- vijay
>>>>
>>>> On 4 April 2018 at 11:16, Chris Johns <chr...@rtems.org> wrote:
>>>>
>>>>> On 04/04/2018 06:36, Vijay Kumar Banerjee wrote:
>>>>> > after pulling the ini-update branch from
>>>>> > https://github.com/cillianodonnell/rtems-tools/tree/ini-update
>>>>> >
>>>>>
>>>>> Any local changes?
>>>>>
>>>>> > I tried running the rtems-test with the following command
>>>>> >
>>>>> > $HOME/development/rtems/rtems-tools/tester/rtems-test
>>>>> > --rtems-tools=$HOME/development/rtems/5 --log=coverage_analysis.log
>>>>> > --rtems-bsp=leon3_qemu --rtems-builddir=$HOME/
>>>>> development/rtems/kernel/leon3
>>>>> > sparc-rtems5/c/leon3/testsuites/samples
>>>>> >
>>>>> > was getting the KeyError for 'coverage'
>>>>> >
>>>>>
>>>>> Please paste the command and output as it appears in the terminal?
>>>>>
>>>>> > current status :
>>>>> > the same command gives the error :
>>>>> > "mandatory item not found in bsp section : bsp,"
>>>>> > to make sure I didn't break something , I also tried running from a
>>>>> freshly
>>>>> > downloaded directory as well, it gives the same error.
>>>>>
>>>>> Did you try running the following command from the top of the source
>>>>> tree:
>>>>>
>>>>>  $ grep -r "mandatory item not found" *
>>>>>
>>>>> ?
>>>>>
>>>>> Chris
>>>>>
>>>>
>>>>
>>
From 84eefb79fcd5c9abcbfce08995ed410d21e3babe Mon Sep 17 00:00:00 2001
From: thelunatic <vijaykumar9...@gmail.com>
Date: Tue, 10 Apr 2018 16:19:04 +0530
Subject: [PATCH] initial

---
 tester/rt/tftpy/TftpServer.py | 4 ++--
 tester/rt/tftpy/TftpStates.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tester/rt/tftpy/TftpServer.py b/tester/rt/tftpy/TftpServer.py
index 07c2107..b6d0ada 100644
--- a/tester/rt/tftpy/TftpServer.py
+++ b/tester/rt/tftpy/TftpServer.py
@@ -53,8 +53,8 @@ class TftpServer(TftpSession):
         for name in 'dyn_file_func', 'upload_open':
             attr = getattr(self, name)
             if attr and not callable(attr):
-                raise TftpException, "%s supplied, but it is not callable." % (
-                    name,)
+                raise TftpException( "%s supplied, but it is not callable." % (
+                    name))
         if os.path.exists(self.root):
             log.debug("tftproot %s does exist", self.root)
             if not os.path.isdir(self.root):
diff --git a/tester/rt/tftpy/TftpStates.py b/tester/rt/tftpy/TftpStates.py
index 801e970..3c147a5 100644
--- a/tester/rt/tftpy/TftpStates.py
+++ b/tester/rt/tftpy/TftpStates.py
@@ -368,7 +368,7 @@ class TftpStateServerRecvWRQ(TftpServerState):
             f = self.context.upload_open(path, self.context)
             if f is None:
                 self.sendError(TftpErrors.AccessViolation)
-                raise TftpException, "Dynamic path %s not permitted" % path
+                raise TftpException("Dynamic path %s not permitted" )% path
             else:
                 self.context.fileobj = f
         else:
-- 
2.14.3

From 18c0ed37737012ec9868dc07d00e7f847753bbc5 Mon Sep 17 00:00:00 2001
From: thelunatic <vijaykumar9...@gmail.com>
Date: Tue, 10 Apr 2018 18:00:16 +0530
Subject: [PATCH] setting raw in get_items

---
 rtemstoolkit/configuration.py | 4 ++--
 
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/rtemstoolkit/configuration.py b/rtemstoolkit/configuration.py
index 10d97e5..53ad79b 100644
--- a/rtemstoolkit/configuration.py
+++ b/rtemstoolkit/configuration.py
@@ -98,7 +98,7 @@ class configuration:
     def get_items(self, section, err = True, flatten = True):
         try:
             items = []
-            for name, key in self.config.items(section):
+            for name, key in self.config.items(section,raw=True):
                 if flatten:
                     items += [(name, key.replace(os.linesep, ' '))]
                 else:
@@ -117,7 +117,7 @@ class configuration:
 
     def get_item_names(self, section, err = True):
         try:
-            return [item[0] for item in self.config.items(section)]
+            return [item[0] for item in self.config.items(section,raw=True)]
         except:
             if err:
                 raise error.general('config: section "%s" not found' % (section))

-- 
2.14.3

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to