Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to marionette==0.30 and new features #10

Merged
merged 6 commits into from
Jun 14, 2013

Conversation

vaidik
Copy link
Contributor

@vaidik vaidik commented Jun 11, 2013

Old TouchMixins have been removed and updated to the new way of using them.

New features:

  • install dev certs
  • install app
    • using manifest file's URL.
    • using browser from Marketplace prod.
    • using browser from Marketplace dev.
    • using Marketplace prod installed app.
    • using Marketplace dev installed app.
  • install marketplace dev

@vaidik
Copy link
Contributor Author

vaidik commented Jun 11, 2013

So, basically with these changes, I run the following commands everyday to get rid of the pain:

ezboot --flash_device unagi flash
ezboot setup --custom_prefs <path_to_custom_prefs>
ezboot install_devcerts --certs_path <path_to_certs_directory>
ezboot install_marketplace_dev

For installing apps:

# install from marketplace prod using the installed app
ezboot install --app APP_NAME --prod

# install from marketplace prod using the browser
ezboot install --app APP_NAME --prod --browser

# install from marketplace dev using the browser
ezboot install --app APP_NAME --browser

# install from marketplace dev using the installed app
ezboot install --app APP_NAME

# install from manifest file URL
ezboot install --manifest MANIFEST_URL


path = '/tmp/marketplace_dev_%s' % int(time.time())
sh('git clone https://github.com/briansmith/marketplace-certs.git %s' % path)
sh('%s/change_trusted_servers.sh full_unagi "https://marketplace-dev.allizom.org,https://marketplace.firefox.com"' % path)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be fixed. this will only work with unagi. i have to figure out how to do this. so this is not good for merging right now. or perhaps dev certs installation can be temporarily removed. ideas?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say do this for now (temporarily):

if args.flash_device != 'unagi':
    raise NotImplementedError('certs can only be installed on unagi right now')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straight forward! 👍

'now.')

def setup_dev():
path = '/tmp/marketplace_dev_%s' % int(time.time())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't go in the tmp dir, it should go in args.work_dir which is already set up for you. You can clone to os.path.join(args.work_dir, 'marketplace-certs'). If it already exists, just cd in and do a git pull, no need to re-clone the entire repo each time because that would be slow.

mc.find_element(*_app_icon_locator)
except NoSuchElementException:
print 'Error: app could not be installed.'
sys.exit(1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be args.error(...)

with pushd(args.work_dir):
path = 'marketplace-certs'

if not os.path.exists('marketplace-certs'):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace this with the variable path

def install_marketplace(args):
# install marketplace dev
def install_dev():
args.manifest = 'https://marketplace-dev.allizom.org/manifest.webapp'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized that this isn't right. The Marketplace is no longer a hosted app so we should not support this (it will cause confusion and invalid bug reports). I think this command should fetch the packaged app from Marketplace, correct? from here: https://marketplace-dev.allizom.org/app/marketplace?src=search

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I am making this function use install --browser --app 'Marketplace Dev'

@kumar303
Copy link
Owner

this is really close! I've been trying out the branch but I'm unable to install the marketplace dev packaged app after a fresh flash. Can you take another look? I think the --browser command just needs to be fixed for the timeout. I can do it manually by navigating to the URL and installing Dev.

@vaidik
Copy link
Contributor Author

vaidik commented Jun 14, 2013

Hmm.. So I tried it again and again and what I observe is that somehow just after starting wifi, these timeouts happen. And it is kinda random. It works at times and it doesn't at times. I am not sue but I think we should go ahead with this. We do experience these kind of issues in gaiatests as well at times. Lets just try it this way a couple of more times and see how this works.

@kumar303
Copy link
Owner

The browser install still isn't working but I have a patch to fix it. I'll merge in your branch and apply it.

kumar303 added a commit that referenced this pull request Jun 14, 2013
Update to marionette==0.30 and new features
@kumar303 kumar303 merged commit 3622832 into kumar303:master Jun 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants