jobs-framework-cli: add --filelog-stdout and --filelog-stderr args to cli
- --filelog-stdout/-o arg added
- --filelog-stderr/-e arg added
Behaviour:
- if --filelog-stdout or --filelog-stderr points to /this/is/directory/, then command fails. For the sake of simplicity, we decided to always expect files and reject the path if it is a directory.
- if the path provided for either -o or -e can't be found in the user's home directory, the command fails
- if --filelog-stdout or --filelog-stderr points to /this/is/directory/this-is-file, log path becomes: /this/is/directory/this-is-file (to achieve T302211, --filelog-stdout and --filelog-stderr should point to same file)
- if --filelog-stdout or --filelog-stderr points to /this/is/directory/this-file-doesnt-exist, log path becomes: /this/is/directory/this-file-doesnt-exist (it creates the non existing file and uses it as the log file. same as before)
- if --filelog-stdout or --filelog-stderr points to /this/directory/doesnt/exist/this-file-doesnt-exist, it throws error "directory /this/directory/doesnt/exist/ doesn't exist"
Initial intention was to work on T304421, but as a side effect,
this also solved T302211
Bug: T304421
Bug: T302211
Change-Id: I426b088179ec127f80aa15b2cde858613555690d