function exec(cmd, opts) {
  if (shell.test('-e', opts.cwd)) {
    expect(shell.exec(cmd, opts || {}).code).to.equal(0, 'Command failed, exit code should be 0');
  }
}
Test create plugin. It add a public plugin and local plugin separately and test them in the
app created by rekit sanity test: a-rekit-npm-test-app.
If test succeeds, the plugins will be removed.
It does below things:
  1. Create a local plugin, test add/mv/rm command.
  2. Create a plublic plugin, test add/mv/rm command.