<commit_before>##########################################################################
# Copyright (c) 2012-2016 ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Universitaetstr 6, CH-8092 Zurich. Attn: Systems Group.
##########################################################################

import os, tempfile, subprocess, time
import debug, machines
from machines import ARMSimulatorBase, MachineFactory

FVP_PATH = '/home/netos/tools/DS-5_v5.24.0/bin'
FVP_LICENSE = '<EMAIL>'
FVP_START_TIMEOUT = 2 # in seconds

class FVPMachineBase(ARMSimulatorBase):
    imagename = "armv7_a9ve_1_image"

    def __init__(self, options):
        super(FVPMachineBase, self).__init__(options)
        self.child = None
        self.telnet = None
        self.tftp_dir = None
        self.options = options
        self.simulator_start_timeout = FVP_START_TIMEOUT

    def get_buildall_target(self):
        return "VExpressEMM-A9"

    def get_tftp_dir(self):
        if self.tftp_dir is None:
            debug.verbose('Creating temporary directory for FVP files')
            self.tftp_dir = tempfile.mkdtemp(prefix='harness_fvp_')
            debug.verbose('FVP install directory is %s' % self.tftp_dir)
        return self.tftp_dir

    def reboot(self):
        self._kill_child()
        cmd = self._get_cmdline()
        debug.verbose('starting "%s" in FVP:reboot' % ' '.join(cmd))
        devnull = open('/dev/null', 'w')
        env = dict(os.environ)
        env['ARMLMD_LICENSE_FILE'] = FVP_LICENSE
        self.child = \
            subprocess.Popen(cmd, stdout=subprocess.PIPE,
                             stderr=devnull, env=env)
        time.sleep(FVP_START_TIMEOUT)<commit_msg>harness/FVP: Do not redirect error output to /dev/null<commit_after>##########################################################################
# Copyright (c) 2012-2016 ETH Zurich.
# All rights reserved.
#
# This file is distributed under the terms in the attached LICENSE file.
# If you do not find this file, copies can be found by writing to:
# ETH Zurich D-INFK, Universitaetstr 6, CH-8092 Zurich. Attn: Systems Group.
##########################################################################

import os, tempfile, subprocess, time
import debug, machines
from machines import ARMSimulatorBase, MachineFactory

FVP_PATH = '/home/netos/tools/DS-5_v5.24.0/bin'
FVP_LICENSE = '<EMAIL>'
FVP_START_TIMEOUT = 2 # in seconds

class FVPMachineBase(ARMSimulatorBase):
    imagename = "armv7_a9ve_1_image"

    def __init__(self, options):
        super(FVPMachineBase, self).__init__(options)
        self.child = None
        self.telnet = None
        self.tftp_dir = None
        self.options = options
        self.simulator_start_timeout = FVP_START_TIMEOUT

    def get_buildall_target(self):
        return "VExpressEMM-A9"

    def get_tftp_dir(self):
        if self.tftp_dir is None:
            debug.verbose('Creating temporary directory for FVP files')
            self.tftp_dir = tempfile.mkdtemp(prefix='harness_fvp_')
            debug.verbose('FVP install directory is %s' % self.tftp_dir)
        return self.tftp_dir

    def reboot(self):
        self._kill_child()
        cmd = self._get_cmdline()
        debug.verbose('starting "%s" in FVP:reboot' % ' '.join(cmd))
        env = dict(os.environ)
        env['ARMLMD_LICENSE_FILE'] = FVP_LICENSE
        self.child = \
            subprocess.Popen(cmd, stdout=subprocess.PIPE,
                             stderr=subprocess.STDOUT, env=env)
        time.sleep(FVP_START_TIMEOUT)
{'fraction_non_alphanumeric': 0.16920152091254753, 'fraction_numerical': 0.012493210211841391, 'mean_word_length': 3.175736961451247, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6587482', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1105, 'n_words': 271}