oscar-cluster / oscar

OSCAR main source repository.
GNU General Public License v2.0
14 stars 3 forks source link

apitest crash if a batch script contains a child parameter without "=" sign. #657

Open dikim33 opened 7 years ago

dikim33 commented 7 years ago

Reported by olahaye74 on 26 Feb 2014 10:09 UTC apitest crashes in a batch script contains a dep that is not found and ran from a directory which is not the torque_validate.apb (in the example below)

In the following testcase test, the line oscar_tst_user.apt was not found (ran from the svn).

cd ~svn/oscar/packages/torque/testing
apitest -T -v -f apitests.d/torque_validate.apb

The crash output is:

Could not parse 'apitests.d/torque_validate.apb'.

Unhandled Error
Traceback (most recent call last):
  File "/usr/bin/apitest", line 162, in start
    self.start_cmdLine()
  File "/usr/bin/apitest", line 297, in start_cmdLine
    reactor.run()
  File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 1169, in run
    self.mainLoop()
  File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 1178, in mainLoop
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/usr/lib64/python2.7/site-packages/twisted/internet/base.py", line 800, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/lib/python2.7/site-packages/libapitest/jobManager.py", line 114, in poll
    self.do_task()
  File "/usr/lib/python2.7/site-packages/libapitest/jobManager.py", line 126, in do_task
    self.Execute()
  File "/usr/lib/python2.7/site-packages/libapitest/jobManager.py", line 258, in Execute
    tB.loadBatchFile(task)
  File "/usr/lib/python2.7/site-packages/libapitest/jobManager.py", line 388, in loadBatchFile
    batchFileTreeRoot = self.batchFileTree.getroot()
exceptions.AttributeError: 'NoneType' object has no attribute 'getroot'

The output should be: FAILED: oscartst_user.apt not found or something similar.

dikim33 commented 7 years ago

Modified by olahaye74 on 26 Feb 2014 10:09 UTC

dikim33 commented 7 years ago

Modified by olahaye74 on 26 Feb 2014 10:10 UTC

dikim33 commented 7 years ago

Modified by olahaye74 on 26 Feb 2014 10:56 UTC

dikim33 commented 7 years ago

Modified by olahaye74 on 26 Feb 2014 10:56 UTC