예제 #1
0
 def run_patch(self, filename):
     # In brief, the patch:
     # - Replaces the crontab (run hourly instead of once a day)
     # - Updates the GPG key for the Mycroft repo
     # - Bumps the platform_build to '9'
     self.log.info("Attempting platform patch...")
     self.cmd('bash ' + filename)
     ConfigurationManager.load_local()
     self.platform_build = 9
예제 #2
0
    def __init__(self, args):
        params = self.__build_params(args)

        if params.config:
            ConfigurationManager.load_local([params.config])

        if exists(params.lib) and isdir(params.lib):
            sys.path.append(params.lib)

        sys.path.append(params.dir)
        self.dir = params.dir

        self.enable_intent = params.enable_intent

        self.__init_client(params)
예제 #3
0
    def __init__(self, args):
        params = self.__build_params(args)

        if params.config:
            ConfigurationManager.load_local([params.config])

        if exists(params.lib) and isdir(params.lib):
            sys.path.append(params.lib)

        sys.path.append(params.dir)
        self.dir = params.dir

        self.enable_intent = params.enable_intent

        self.__init_client(params)
예제 #4
0
import sys
import unittest

from os.path import dirname
from xmlrunner import XMLTestRunner

from mycroft.configuration import ConfigurationManager

__author__ = 'seanfitz, jdorleans'

fail_on_error = "--fail-on-error" in sys.argv
ConfigurationManager.load_local(['mycroft.ini'])

tests = unittest.TestLoader().discover(dirname(__file__), "*.py")
runner = XMLTestRunner("./build/report/tests")
result = runner.run(tests)

if fail_on_error and len(result.failures + result.errors) > 0:
    sys.exit(1)
예제 #5
0
import sys
import unittest

from os.path import dirname
from xmlrunner import XMLTestRunner

from mycroft.configuration import ConfigurationManager

__author__ = 'seanfitz, jdorleans'
if __name__ == "__main__":
    fail_on_error = "--fail-on-error" in sys.argv
    ConfigurationManager.load_local(['mycroft.ini'])

    tests = unittest.TestLoader().discover(dirname(__file__), "*.py")
    runner = XMLTestRunner("./build/report/tests")
    result = runner.run(tests)

    if fail_on_error and len(result.failures + result.errors) > 0:
        sys.exit(1)
예제 #6
0
 def test_load_local_with_locations(self):
     ConfigurationManager.load_defaults()
     config = ConfigurationManager.load_local([self.config_path])
     self.assert_config(config, 'pt-br', 'espeak', 'f1')
예제 #7
0
 def test_load_local(self):
     ConfigurationManager.load_defaults()
     self.assert_config(ConfigurationManager.load_local())
예제 #8
0
 def test_load_local_with_locations(self):
     ConfigurationManager.load_defaults()
     config = ConfigurationManager.load_local([self.config_path])
     self.assert_config(config, 'pt-br', 'espeak')
예제 #9
0
 def test_load_local(self):
     ConfigurationManager.load_defaults()
     self.assert_config(ConfigurationManager.load_local())
예제 #10
0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import sys
from unittest import TestLoader

from os.path import dirname
from xmlrunner import XMLTestRunner

from mycroft.configuration import ConfigurationManager

if __name__ == "__main__":
    fail_on_error = "--fail-on-error" in sys.argv
    ConfigurationManager.load_local(['mycroft.conf'], keep_user_config=False)

    tests = TestLoader().discover(dirname(__file__), "*.py")
    result = XMLTestRunner("./build/report/tests").run(tests)

    if fail_on_error and len(result.failures + result.errors) > 0:
        sys.exit(1)
예제 #11
0
import sys
from unittest import TestLoader

from os.path import dirname
from xmlrunner import XMLTestRunner

from mycroft.configuration import ConfigurationManager

__author__ = 'seanfitz, jdorleans'

if __name__ == "__main__":
    fail_on_error = "--fail-on-error" in sys.argv
    ConfigurationManager.load_local(['mycroft.conf'], keep_user_config=False)

    tests = TestLoader().discover(dirname(__file__), "*.py")
    result = XMLTestRunner("./build/report/tests").run(tests)

    if fail_on_error and len(result.failures + result.errors) > 0:
        sys.exit(1)