コード例 #1
0
ファイル: iris.py プロジェクト: mwobensmith/proto
 def __init__(self):
     self.parse_args()
     initialize_logger(LOG_FILENAME, self.args.level)
     self.module_dir = get_module_dir()
     self.platform = get_platform()
     self.os = get_os()
     self.main()
     test_runner.run(self)
コード例 #2
0
 def __init__(self):
     self.args = parse_args()
     initialize_logger(LOG_FILENAME, self.args.level)
     self.init_tesseract_path()
     self.module_dir = get_module_dir()
     self.platform = get_platform()
     self.os = Settings.getOS()
     self.main()
     test_runner.run(self)
コード例 #3
0
ファイル: iris.py プロジェクト: psilaghi/iris
 def __init__(self):
     global logger
     self.parse_args()
     logger = initialize_logger(self)
     self.module_dir = get_module_dir()
     self.platform = get_platform()
     self.os = get_os()
     self.main()
     test_runner.run(self)
コード例 #4
0
 def __init__(self):
     cleanup.init()
     Iris.fix_terminal_encoding()
     self.initialize_platform()
     self.verify_config()
     if self.control_center():
         self.initialize_run()
         run(self)
     else:
         self.delete_run_directory()
         self.finish(0)
コード例 #5
0
ファイル: app.py プロジェクト: mwxfr/fx_visual_tests
    def __init__(self):
        print "app.py: This is our main app"
        """
        Things to do here:
            * argument parsing
            * download and install Firefox
            * set up logging
        """
        self.platform = os.environ["PLATFORM_NAME"]
        self.os = os.environ["OS_NAME"]

        test_runner.run(self)
コード例 #6
0
ファイル: __main__.py プロジェクト: davehunt/iris
 def __init__(self):
     self.args = parse_args()
     initialize_logger(LOG_FILENAME, self.args.level)
     self.process_list = []
     self.check_keyboard_state()
     self.init_tesseract_path()
     self.check_7zip()
     self.module_dir = get_module_dir()
     self.platform = get_platform()
     self.os = Settings.getOS()
     self.local_web_root = os.path.join(self.module_dir, 'iris', 'local_web')
     self.base_local_web_url = 'http://127.0.0.1:%s' % self.args.port
     self.start_local_web_server(self.local_web_root, self.args.port)
     self.main()
     self.create_run_directory()
     run(self)
コード例 #7
0
ファイル: listener.py プロジェクト: jakelazaroff/lightspeed
	def run_hook(_config, parsed, updated_branch):
		notify_data = {"msg": "running hook",
			"branch": updated_branch}
		for attr in ['pusher', 'latest_hash']:
			notify_data[attr] = parsed.get(attr)
		notify(notify_data)
		discord_notify(_config, "{pusher} {msg} {name} on {branch}".format(**dict(notify_data, name=name)))
		worked, output = run(_exec, _dir, env={'branch': updated_branch}, logger=logger)

		msg = "CI job {} {} on branch({})".format(name, "succeeded" if worked else "FAILED", updated_branch)
		notify_data['msg'] = msg
		if not worked:
			notify_data['output'] = output.split('\n')
		notify(notify_data)

		logger.info(msg)
		if output:
			logger.info(output)
		if not worked:
			logger.info("[no output]")

		discord_msg = msg
		if not worked:
			discord_msg += "\n```{}```".format(output[:1800]) if output else "`[no output]`"
		discord_notify(_config, discord_msg)
コード例 #8
0
ファイル: __main__.py プロジェクト: yyayegor/iris
def run_iris():
    """Runs Iris."""
    use_control_center, tests_list = control_center()
    if use_control_center:
        start_local_web_server(parse_args().port)
        if tests_list is not None and len(tests_list) > 0:
            tests = tests_list
        else:
            tests, packages = load_tests(master_test_list)
            if len(tests) == 0:
                logger.error('Specified tests not found, aborting run.')
                finish(1)
        try:
            browser = FirefoxApp()
            run(master_test_list, tests, browser)
        except (ValueError, KeyboardInterrupt):
            finish(1)
    else:
        IrisCore.delete_run_directory()
        finish(0)
コード例 #9
0
    def run_hook(_config, parsed, updated_branch):

        github_status(parsed, 'pending', _config.get('github_status_token'))

        notify_data = {"msg": "running hook", "branch": updated_branch}
        for attr in ['pusher', 'latest_hash']:
            notify_data[attr] = parsed.get(attr)
        notify(notify_data)
        discord_notify(
            _config, "{pusher} {msg} {name} on {branch}({latest_hash})".format(
                **dict(notify_data, name=name)))
        worked, output = run(_exec,
                             _dir,
                             env={'branch': updated_branch},
                             logger=logger)

        msg = u"CI job {} {} on {}({})".format(
            name, "succeeded" if worked else "FAILED", updated_branch,
            parsed.get('latest_hash'))
        notify_data['msg'] = msg
        discord_msg = msg
        logger.info(msg)

        _status = 'success'

        if not worked:
            notify_data['output'] = output.split('\n')
            discord_msg += u"\n```{}```".format(
                output[-1800:]) if output else "`[no output]`"
            _status = 'failure'

        github_status(parsed, _status, _config.get('github_status_token'))
        notify(notify_data)
        discord_notify(_config, discord_msg)

        if output:
            logger.info(output)
        else:
            logger.info("[no output]")
コード例 #10
0
def test_Q024_SwapNodesInPairs():
    s = Solution()
    run(s, 'Q024')
コード例 #11
0
def test_Q070_ClimbingStairs():
    s = Solution()
    run(s, 'Q070')
コード例 #12
0
ファイル: test_Q134_GasStation.py プロジェクト: jiaz/leetpy
def test_Q134_GasStation():
    s = Solution()
    run(s, 'Q134')
コード例 #13
0
def test_Q069_Sqrtx():
    s = Solution()
    run(s, 'Q069')
コード例 #14
0
def test_Q119_PascalsTriangleII():
    s = Solution()
    run(s, 'Q119')
コード例 #15
0
def test_Q160_IntersectionOfTwoLinkedLists():
    s = Solution()
    run(s, 'Q160')
コード例 #16
0
def test_Q216_CombinationSumIII():
    s = Solution()
    run(s, 'Q216')
コード例 #17
0
def test_Q300_LongestIncreasingSubsequence():
    s = Solution()
    run(s, 'Q300')
コード例 #18
0
def test_Q094_BinaryTreeInorderTraversal():
    s = Solution()
    run(s, 'Q094')
コード例 #19
0
ファイル: test_Q204_CountPrimes.py プロジェクト: jiaz/leetpy
def test_Q204_CountPrimes():
    s = Solution()
    run(s, 'Q204')
コード例 #20
0
ファイル: test_Q038_CountAndSay.py プロジェクト: jiaz/leetpy
def test_Q038_CountAndSay():
    s = Solution()
    run(s, 'Q038')
コード例 #21
0
ファイル: test_Q055_JumpGame.py プロジェクト: jiaz/leetpy
def test_Q055_JumpGame():
    s = Solution()
    run(s, 'Q055')
コード例 #22
0
ファイル: test_Q134_GasStation.py プロジェクト: jiaz/leetpy
def test_Q134_GasStation():
    s = Solution()
    run(s, "Q134")
コード例 #23
0
def test_Q152_MaximumProductSubarray():
    s = Solution()
    run(s, 'Q152')
コード例 #24
0
def test_Q020_ValidParentheses():
    s = Solution()
    run(s, 'Q020')
コード例 #25
0
def test_Q109_ConvertSortedListToBinarySearchTree():
    s = Solution()
    run(s, 'Q109')
コード例 #26
0
def test_Q131_PalindromePartitioning():
    s = Solution()
    run(s, 'Q131')
コード例 #27
0
def test_Q239_SlidingWindowMaximum():
    s = Solution()
    run(s, 'Q239')
コード例 #28
0
ファイル: test_Q140_WordBreakII.py プロジェクト: jiaz/leetpy
def test_Q140_WordBreakII():
    s = Solution()
    run(s, 'Q140')
コード例 #29
0
def test_Q057_InsertInterval():
    s = Solution()
    run(s, "Q057")
コード例 #30
0
ファイル: test_Q135_Candy.py プロジェクト: jiaz/leetpy
def test_Q135_Candy():
    s = Solution()
    run(s, 'Q135')
コード例 #31
0
def test_Q086_PartitionList():
    s = Solution()
    run(s, 'Q086')
コード例 #32
0
def test_Q206_ReverseLinkedList():
    s = Solution()
    run(s, 'Q206')
コード例 #33
0
ファイル: test_Q164_MaximumGap.py プロジェクト: jiaz/leetpy
def test_Q164_MaximumGap():
    s = Solution()
    run(s, 'Q164')
コード例 #34
0
def test_Q022_GenerateParentheses():
    s = Solution()
    run(s, 'Q022')
コード例 #35
0
def test_Q029_DivideTwoIntegers():
    s = Solution()
    run(s, 'Q029')
コード例 #36
0
ファイル: test_Q283_MoveZeroes.py プロジェクト: jiaz/leetpy
def test_Q283_MoveZeroes():
    s = Solution()
    run(s, 'Q283')
コード例 #37
0
ファイル: test_Q061_RotateList.py プロジェクト: jiaz/leetpy
def test_Q061_RotateList():
    s = Solution()
    run(s, 'Q061')
コード例 #38
0
def test_Q103_BinaryTreeZigzagLevelOrderTraversal():
    s = Solution()
    run(s, 'Q103')
コード例 #39
0
def test_Q080_RemoveDuplicatesFromSortedArrayII():
    s = Solution()
    run(s, 'Q080')
コード例 #40
0
ファイル: test_Q049_Anagrams.py プロジェクト: jiaz/leetpy
def test_Q049_Anagrams():
    s = Solution()
    run(s, 'Q049')
コード例 #41
0
def test_Q013_RomanToInteger():
    s = Solution()
    run(s, "Q013")
コード例 #42
0
def test_Q268_MissingNumber():
    s = Solution()
    run(s, "Q268")
コード例 #43
0
            test_curve_fit(data[:, (0, 1)],
                           fitted_curve,
                           max_mean_err=nominal_vel * 0.3,
                           inlier_range=nominal_vel * 0.5,
                           max_outliers=len(data[:, 0]) * 0.1)

            # axis1: encoder.vel_estimate
            slope, offset, fitted_curve = fit_line(data[:, (0, 2)])
            test_assert_eq(slope, 0.0, range=nominal_vel * 0.02)
            test_assert_eq(offset, -nominal_vel, accuracy=0.05)
            test_curve_fit(data[:, (0, 2)],
                           fitted_curve,
                           max_mean_err=nominal_vel * 0.3,
                           inlier_range=nominal_vel * 0.5,
                           max_outliers=len(data[:, 0]) * 0.1)

            # axis0: encoder.pos_estimate
            slope, offset, fitted_curve = fit_line(data[:, (0, 3)])
            test_assert_eq(slope, nominal_vel, accuracy=0.01)
            test_curve_fit(data[:, (0, 3)],
                           fitted_curve,
                           max_mean_err=nominal_vel * 0.01,
                           inlier_range=nominal_vel * 0.1,
                           max_outliers=len(data[:, 0]) * 0.01)


tests = [FightingTest()]

if __name__ == '__main__':
    test_runner.run(tests)
コード例 #44
0
def test_Q047_PermutationsII():
    s = Solution()
    run(s, 'Q047')
コード例 #45
0
def test_Q083_RemoveDuplicatesFromSortedList():
    s = Solution()
    run(s, 'Q083')