Exemple #1
0
    def setupProject(self):
        self.project.debugger.enabled = False
        FuzzedHttpServer(self.project, 8898)

        process = ProjectProcess(
            self.project,
            [
                'python3',
                '-m',
                'wpull',
                '127.0.0.1:8898',
                '--timeout',
                '2.0',
                '--tries',
                '1',
            ],
        )

        process.max_memory = 500000000

        process.env.set(
            'PYTHONPATH',
            os.path.join(os.path.abspath(os.path.dirname(__file__)), '..',
                         '..'))

        WatchProcess(process, exitcode_score=0.45)
        stdout_watcher = WatchStdout(process)
        stdout_watcher.ignoreRegex(r'Read timed out', )
        stdout_watcher.ignoreRegex(r'Error parsing status line', )
        stdout_watcher.ignoreRegex(
            r'WARNING Invalid content length: invalid literal for int')
        stdout_watcher.ignoreRegex(r'encountered an error: zlib error: ')
Exemple #2
0
    def setupProject(self):
        self.project.debugger.enabled = False
        FuzzedHttpServer(self.project, 8898)

        process = ProjectProcess(
            self.project,
            ['python3', '-m', 'wpull',
                '127.0.0.1:8898',
                '--timeout', '2.0',
                '--tries', '1',
            ],
        )

        process.max_memory = 500000000

        process.env.set(
            'PYTHONPATH',
            os.path.join(
                os.path.abspath(os.path.dirname(__file__)), '..', '..')
        )

        WatchProcess(process, exitcode_score=0.45)
        stdout_watcher = WatchStdout(process)
        stdout_watcher.ignoreRegex(
            r'Read timed out',
        )
        stdout_watcher.ignoreRegex(
            r'Error parsing status line',
        )
        stdout_watcher.ignoreRegex(
            r'WARNING Invalid content length: invalid literal for int'
        )
        stdout_watcher.ignoreRegex(
            r'encountered an error: zlib error: '
        )