Skip to content

Commit

Permalink
move all firefoxos-related functionality together
Browse files Browse the repository at this point in the history
and add firefox os resetting to reset.sh so it's functional
  • Loading branch information
jlipps committed Oct 17, 2013
1 parent 6728ea5 commit 059a7dc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function(grunt) {
, trailing: true
, node: true
, strict: true
, ignores: ['./submodules/**/*.js', './node_modules/**/*.js', './lib/devices/ios/webdriver-atoms/*.js', './sample-code/**/*.js', './test/harmony/**/*.js', './test/functional/_joined/*.js', './lib/server/static/**/*.js', './lib/hybrid/firefoxos/atoms/*.js', './lib/devices/ios/uiauto/**/*.js']
, ignores: ['./submodules/**/*.js', './node_modules/**/*.js', './lib/devices/ios/webdriver-atoms/*.js', './sample-code/**/*.js', './test/harmony/**/*.js', './test/functional/_joined/*.js', './lib/server/static/**/*.js', './lib/devices/firefoxos/atoms/*.js', './lib/devices/ios/uiauto/**/*.js']
}
}
, mochaTest: {
Expand Down
2 changes: 1 addition & 1 deletion lib/appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var routing = require('./server/routing.js')
, android = require('./devices/android.js')
, selendroid = require('./devices/selendroid.js')
, chrome = require('./devices/chrome_android.js')
, firefoxOs = require('./devices/firefoxos.js')
, firefoxOs = require('./devices/firefoxos/firefoxos.js')
, status = require("./server/status.js")
, helpers = require('./helpers.js')
, isWindows = helpers.isWindows();
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions lib/devices/firefoxos.js → lib/devices/firefoxos/firefoxos.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"use strict";

var errors = require('../server/errors.js')
var errors = require('../../server/errors.js')
, _ = require('underscore')
, logger = require('../server/logger.js').get('appium')
, logger = require('../../server/logger.js').get('appium')
, net = require('net')
, deviceCommon = require('./common.js')
, status = require("../server/status.js")
, getAtomSrc = require('../hybrid/firefoxos/firefoxos-atoms').get
, deviceCommon = require('../common.js')
, status = require("../../server/status.js")
, getAtomSrc = require('./firefoxos-atoms.js').get
, async = require('async')
, NotYetImplementedError = errors.NotYetImplementedError;

Expand Down
14 changes: 13 additions & 1 deletion reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ should_reset_android=false
should_reset_ios=false
should_reset_selendroid=false
should_reset_gappium=false
should_reset_firefoxos=false
include_dev=false
appium_home=$(pwd)
reset_successful=false
Expand All @@ -24,6 +25,7 @@ do
"--android") should_reset_android=true;;
"--ios") should_reset_ios=true;;
"--selendroid") should_reset_selendroid=true;;
"--firefoxos") should_reset_firefoxos=true;;
"--gappium") should_reset_gappium=true;;
"--dev") include_dev=true;;
"-v") verbose=true;;
Expand All @@ -33,11 +35,12 @@ do
shift
done

if ! $should_reset_android && ! $should_reset_ios && ! $should_reset_selendroid && ! $should_reset_gappium ; then
if ! $should_reset_android && ! $should_reset_ios && ! $should_reset_selendroid && ! $should_reset_gappium && ! $should_reset_firefoxos; then
should_reset_android=true
should_reset_ios=true
should_reset_selendroid=true
should_reset_gappium=true
should_reset_firefoxos=true
fi

run_cmd() {
Expand Down Expand Up @@ -277,6 +280,12 @@ reset_gappium() {
fi
}

reset_firefoxos() {
echo "RESETTING FIREFOXOS"
echo "* Setting Firefox OS config to Appium's version"
run_cmd $grunt setConfigVer:firefoxos
}

cleanup() {
echo "CLEANING UP"
echo "* Cleaning any temp files"
Expand All @@ -302,6 +311,9 @@ main() {
if $should_reset_selendroid ; then
reset_selendroid
fi
if $should_reset_firefoxos ; then
reset_firefoxos
fi
if $should_reset_gappium ; then
reset_gappium
fi
Expand Down

0 comments on commit 059a7dc

Please sign in to comment.