How to prevent that RQM command line adapter (CLA) always adds "com.ibm.rqm.adapter.resultAttachmentsFile=VALUE" to the command line argument list?
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: printargsthe command arguments will evaluate to:
Arguments: arg1 arg2
argc = 4The 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
argv[0] = printarg
argv[1] = arg1
argv[2] = arg2
argv[3] = com.ibm.rqm.adapter.resultAttachmentsFile=/tmp/QMAdapter3942443898107188090.attach
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.attachwhich 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
Accepted answer
Comments
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.
Look at this defect https://jazz.net/jazz02/web/projects/Rational%20Quality%20Manager#action=com.ibm.team.workitem.viewWorkItem&id=125876
It was fixed in an APAR
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.
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
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
-
RQM 5.0.2 is able to execute command line tests using the RQM 6.0 CLA
- 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.
Comments
Timo Reiss
Aug 31 '15, 10:28 a.m.Forgot to mention the version of RQM we are running: it is RQM 5.0.2 iFix007