Github user sarangan12 commented on a diff in the pull request:
https://github.com/apache/cordova-paramedic/pull/5#discussion_r62901339
--- Diff: lib/paramedic.js ---
@@ -175,39 +178,58 @@ ParamedicRunner.prototype.runTests = function() {
reject(new Error('device is disconnected before passing the
tests'));
});
- var command = self.getCommandForStartingTests();
- logger.normal('cordova-paramedic: running command ' + command);
-
- exec(command, function(code, output) {
- if(code) {
- // this trace is automatically available in verbose mode
- // so we check for this flag to not trace twice
- if (!self.config.verbose) {
- logger.normal(output);
+ return self.getCommandForStartingTests()
+ .then(function(command){
+ self.setPermissions();
+ logger.normal('cordova-paramedic: running command ' + command);
+ exec(command, function(code, output) {
+ if(code) {
+ // this trace is automatically available in verbose
mode
+ // so we check for this flag to not trace twice
+ if (!self.config.verbose) {
+ logger.normal(output);
+ }
+ logger.normal('cordova-paramedic: unable to run tests;
command log is available above');
+ return reject(new Error(command + " returned error
code " + code));
}
- logger.normal('cordova-paramedic: unable to run tests;
command log is available above');
- return reject(new Error(command + " returned error code "
+ code));
- }
- // skip tests if it was just build
- if (!self.shouldWaitForTestResult()) {
- return resolve(true);
- }
+ // skip tests if it was just build
+ if (!self.shouldWaitForTestResult()) {
+ return resolve(true);
--- End diff --
Actually, it was off proviously. fixed now
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]