예제 #1
0
    def set_up(self):
        # Set a gnatdebug common to all tests
        os.environ['ADA_DEBUG_FILE'] = os.path.join(self.test_dir, 'tests',
                                                    'gnatdebug')

        # The following are used by the internal testsuite
        os.environ['GNATSTUDIO_TESTSUITE_SCRIPTS'] = os.path.join(
            os.path.dirname(__file__), 'internal', 'scripts')
        os.environ['GNATSTUDIO_GVD_TESTSUITE'] = os.path.join(
            os.path.dirname(__file__), 'internal', 'gvd_testsuite')
        os.environ['GPS_SRC_DIR'] = os.path.join(os.path.dirname(__file__),
                                                 '..')
        os.environ['PYTHONPATH'] = "{}{}{}".format(
            os.path.join(os.path.dirname(__file__), 'internal', 'tests'),
            os.path.pathsep, os.environ.get('PYTHONPATH', ''))
        os.environ['GPS_TEST_CONTEXT'] = 'nightly'
        os.environ['CODEPEER_DEFAULT_LEVEL'] = '3'

        # Launch Xvfb if needs be
        self.xvfb = None

        if (not self.main.args.noxvfb) and Env().platform.endswith('linux'):
            Xvfbs.start_displays(DEFAULT_XVFB_DISPLAY, self.main.args.jobs)

        # Export the WINDOWS_DESKTOP environment variable to
        # test GPS in a separate virtual desktop on Windows
        if Env().build.os.name == 'windows':
            os.environ['WINDOWS_DESKTOP'] = "gps_desktop"
예제 #2
0
파일: testsuite.py 프로젝트: AdaCore/gps
    def set_up(self):

        base = os.path.dirname(__file__)
        # Set a gnatdebug common to all tests
        os.environ['ADA_DEBUG_FILE'] = os.path.join(
            self.test_dir, 'tests', 'gnatdebug')

        # The following are used by the internal testsuite
        os.environ['GNATSTUDIO_TESTSUITE_SCRIPTS'] = os.path.join(
            base, 'internal', 'scripts')
        os.environ['GNATSTUDIO_GVD_TESTSUITE'] = os.path.join(
            base, 'internal', 'gvd_testsuite')
        os.environ['GPS_SRC_DIR'] = os.path.join(base, '..')
        os.environ['PYTHONPATH'] = "{}{}{}".format(
            os.path.join(base, 'internal', 'tests'),
            os.path.pathsep,
            os.environ.get('PYTHONPATH', ''))
        os.environ['GPS_TEST_CONTEXT'] = 'nightly'
        os.environ['CODEPEER_DEFAULT_LEVEL'] = '3'

        # Prepare valgrind command line

        self.env.wait_factor = 1
        self.env.valgrind_cmd = []

        if self.env.options.valgrind_memcheck:
            self.env.valgrind_cmd = [find_executable("valgrind")
                                     ] + [opt.format(base=base)
                                          for opt in VALGRIND_OPTIONS]
            self.env.wait_factor = 10  # valgrind is slow

        # Launch Xvfb if needs be
        self.xvfb = None

        if (not self.main.args.noxvfb) and Env().platform.endswith('linux'):
            Xvfbs.start_displays(DEFAULT_XVFB_DISPLAY, self.main.args.jobs)

        # Export the WINDOWS_DESKTOP environment variable to
        # test GPS in a separate virtual desktop on Windows
        if (not self.main.args.noxvfb) and Env().build.os.name == 'windows':
            os.environ['WINDOWS_DESKTOP'] = "gps_desktop"
예제 #3
0
파일: testsuite.py 프로젝트: AdaCore/gps
 def tear_down(self):
     super(GSPublicTestsuite, self).tear_down()
     Xvfbs.stop_displays()