24e5498021
Currently when a non-existing FILE is passed to 'tvmc tune' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, kindly informing the user about the non-existing FILE before exiting. Add test for verifying if 'tvmc compile' and 'tvmc tune' commands handle correctly the FILE option when it is invalid (e.g. missing, a dir, or a broken link). A TVMCException will be generated by test_tune_rpc_tracker_parsing test because FILE will be set by pytest to a mock object, which is not a valid input. Since FILE argument is irrelevant for the test in question, circumvent the Mock hijack of FILE argument by setting it before using mock. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>