Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-20228

Test command with args

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.10
    • Component/s: Convert

      Description

      The default command line tester does not allow args on the comandLine node.
      In some cases, to test the command, we need to pass args.
      eg. Blender is a GUI application, to work headless, we need to pass the -b (background) argument.

      Proposed solution (advanced by Florent Guillaume):

      • Add to CommandLineDescriptor an optional testParameterString (also winTestParameterString) xml element;
      • Add getTestParametersString() method;
      • Change SystemPathExistTester to use these test parameters on command runtime exec.

      It's now possible in the extension point for a command to include a <testParameterString>:

        <extension target="org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent" point="command">
          <command name="mycommand">
            <commandLine>somecommand</commandLine>
            <parameterString>arg1 --arg2 --arg3</parameterString>
            <winCommand>somecommand.exe</winCommand>
            <winParameterString>arg1 /arg2 /arg3</winParameterString>
            <testParameterString>--exists</testParameterString>
            <winTestParameterString>/exists</winTestParameterString>
          </command>
        </extension>
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: