It's all about the answers!

Ask a question

How to prevent that RQM command line adapter (CLA) always adds "com.ibm.rqm.adapter.resultAttachmentsFile=VALUE" to the command line argument list?


Timo Reiss (209512) | asked Aug 31 '15, 6:10 a.m.
Hi guys,

today I stumbled across the following behaviour: whenever RQM executes a script or executable via a CLA script, the system always adds a command line argument to the command specified in the test script:

E.g., setting up a command line test script using:
Command: printargs
Arguments: arg1 arg2
the command arguments will evaluate to:
argc = 4
argv[0] = printarg
argv[1] = arg1
argv[2] = arg2
argv[3] = com.ibm.rqm.adapter.resultAttachmentsFile=/tmp/QMAdapter3942443898107188090.attach
The CLA test I am currently working on uses a command which is very strict with respect to command line parameters it receives, i.e., when parsing the command line arguments the command always exists with error
Error: Invalid option 'com.ibm.rqm.adapter.resultAttachmentsFile'
which effectively breaks the test.

Thus my question:
Is there any way to prohibit that the system adds the option 'com.ibm.rqm.adapter.resultAttachmentsFile=VALUE' to the command line arguments of the called script?

Also, as contained in the documentation, the process environment contains the environment variable  qm_AttachmentsFile:
qm_AttachmentsFile = /tmp/QMAdapter3942443898107188090.attach
which refers to the same attachments file as the one passed as a command line argument to the CLA command. This makes me wonder, why the system auto-appends this value as a command line argument in the first place.

As always, any input is greatly appreciated. Thanks a lot in advance & Cheers
Timo

Comments
Timo Reiss commented Aug 31 '15, 10:28 a.m.

Forgot to mention the version of RQM we are running: it is RQM 5.0.2 iFix007

Accepted answer


permanent link
David Mehaffy (90123238) | answered Aug 31 '15, 10:14 a.m.
JAZZ DEVELOPER
we saw this a long time ago - this has been fixed but I don't remember in which level.
Timo Reiss selected this answer as the correct answer

Comments
Timo Reiss commented Aug 31 '15, 10:26 a.m.

David,

thanks for your answer.

Are you referring to Defect 117081 - Auto-appended script parameters cause CLI script run failure? However, as far as I understand this item, it has been closed as "works as designed"...

Cheers
Timo.


David Mehaffy commented Aug 31 '15, 10:51 a.m.
JAZZ DEVELOPER

Timo Reiss commented Sep 01 '15, 3:33 a.m.

David,

thanks again for your answer. Seemingly, this defect has been fixed in release 6.0. Apparently no backport to any earlier release or interim fix is available.

I guess using the CLA from 6.0 in an 5.0.2 environment is not an option due to compatibility reasons. I.e., I need to apply the workaround of using a wrapper script mentioned in APAR PI27748?

Cheers
Timo.


David Mehaffy commented Sep 01 '15, 9:16 a.m.
JAZZ DEVELOPER

I think you can request the APAR which I believe is in an iFix somewhere.  We are running on 5.0.2 and we don't have to use a wrapper script


Timo Reiss commented Sep 01 '15, 9:40 a.m.

David,

In the meantime I contacted Rational support with just that intent. The proposed solution is to use the CLA of RQM 6.0 even in an 5.0.2 environment. Compatibility should not to be an issue,

I quickly tried it and can verify that

  1. RQM 5.0.2 is able to execute command line tests using the RQM 6.0 CLA
  2. the RQM 6.0 CLA does not append "com.ibm.rqm.adapter.resultAttachmentsFile=VALUE" to the argument list of the command called by the test script.

With that, my problem is solved. Hopefully, no compatibility issues will come up with the CLA 6.0 in a 5.0.2 environment. At least until now, everything looks fine.

Thanks again for your help, which I really appreciate.

Cheers
Timo.

Your answer


Register or to post your answer.