Exemplo n.º 1
0
    def __init__(self):
        super(SingleTestRunnerWebService, self).__init__()

        # With this lock we should control access to certain resources inside this class
        self.resource_lock = thread.allocate_lock()

        self.RestRequest = construct_enum(REST_MUTS='muts',
                                          REST_TEST_SPEC='test_spec',
                                          REST_TEST_RESULTS='test_results')
Exemplo n.º 2
0
    def __init__(self):
        super(SingleTestRunnerWebService, self).__init__()

        # With this lock we should control access to certain resources inside this class
        self.resource_lock = thread.allocate_lock()

        self.RestRequest = construct_enum(REST_MUTS='muts',
                                          REST_TEST_SPEC='test_spec',
                                          REST_TEST_RESULTS='test_results')
Exemplo n.º 3
0
    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.

Author: Przemyslaw Wirkus <*****@*****.**>
"""

from workspace_tools.utils import construct_enum

ResultExporterType = construct_enum(
    HTML='Html_Exporter',
    JUNIT='JUnit_Exporter',
    JUNIT_OPER='JUnit_Exporter_Interoperability',
    BUILD='Build_Exporter',
    PRINT='Print_Exporter')


class ReportExporter():
    """ Class exports extended test result Python data structure to
        different formats like HTML, JUnit XML.

    Parameter 'test_result_ext' format:

    u'uARM': {   u'LPC1768': {   'MBED_2': {   0: {   'copy_method': 'shutils.copy()',
                                                      'duration': 20,
                                                      'elapsed_time': 1.7929999828338623,
                                                      'output': 'Host test instrumentation on ...\r\n',
                                                      'result': 'OK',
Exemplo n.º 4
0
    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.

Author: Przemyslaw Wirkus <*****@*****.**>
"""

from workspace_tools.utils import construct_enum

ResultExporterType = construct_enum(JSON='Json_Exporter',
                                    TEXT='Text_Exporter',
                                    HTML='Html_Exporter')


def exporter_factory(result_exporter_type):
    pass


def exporter_html(test_result_ext):
    """
    Parameter 'test_result_ext' format:

    u'uARM': {   u'LPC1768': {   'MBED_2': {   0: {   'copy_method': 'shutils.copy()',
                                                      'duration': 20,
                                                      'elapsed_time': 1.7929999828338623,
                                                      'single_test_output': 'Host test instrumentation on ...\r\n',
Exemplo n.º 5
0
    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.

Author: Przemyslaw Wirkus <*****@*****.**>
"""

from workspace_tools.utils import construct_enum


ResultExporterType = construct_enum(HTML='Html_Exporter',
                                    JUNIT='JUnit_Exporter',
                                    BUILD='Build_Exporter')


class ReportExporter():
    """ Class exports extended test result Python data structure to
        different formats like HTML, JUnit XML.

    Parameter 'test_result_ext' format:

    u'uARM': {   u'LPC1768': {   'MBED_2': {   0: {   'copy_method': 'shutils.copy()',
                                                      'duration': 20,
                                                      'elapsed_time': 1.7929999828338623,
                                                      'single_test_output': 'Host test instrumentation on ...\r\n',
                                                      'single_test_result': 'OK',
                                                      'target_name': u'LPC1768',
Exemplo n.º 6
0
    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.

Author: Przemyslaw Wirkus <*****@*****.**>
"""

from workspace_tools.utils import construct_enum


ResultExporterType = construct_enum(
    HTML="Html_Exporter", JUNIT="JUnit_Exporter", JUNIT_OPER="JUnit_Exporter_Interoperability", BUILD="Build_Exporter"
)


class ReportExporter:
    """ Class exports extended test result Python data structure to
        different formats like HTML, JUnit XML.

    Parameter 'test_result_ext' format:

    u'uARM': {   u'LPC1768': {   'MBED_2': {   0: {   'copy_method': 'shutils.copy()',
                                                      'duration': 20,
                                                      'elapsed_time': 1.7929999828338623,
                                                      'single_test_output': 'Host test instrumentation on ...\r\n',
                                                      'single_test_result': 'OK',
                                                      'target_name': u'LPC1768',
Exemplo n.º 7
0
    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.

Author: Przemyslaw Wirkus <*****@*****.**>
"""

from workspace_tools.utils import construct_enum


ResultExporterType = construct_enum(JSON='Json_Exporter',
                                    TEXT='Text_Exporter',
                                    HTML='Html_Exporter')


def exporter_factory(result_exporter_type):
    pass


def exporter_html(test_result_ext):
    """
    Parameter 'test_result_ext' format:

    u'uARM': {   u'LPC1768': {   'MBED_2': {   0: {   'copy_method': 'shutils.copy()',
                                                      'duration': 20,
                                                      'elapsed_time': 1.7929999828338623,
                                                      'single_test_output': 'Host test instrumentation on ...\r\n',
Exemplo n.º 8
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.

Author: Przemyslaw Wirkus <*****@*****.**>
"""

from workspace_tools.utils import construct_enum


ResultExporterType = construct_enum(HTML='Html_Exporter',
                                    JUNIT='JUnit_Exporter',
                                    JUNIT_OPER='JUnit_Exporter_Interoperability',
                                    BUILD='Build_Exporter',
                                    PRINT='Print_Exporter')


class ReportExporter():
    """ Class exports extended test result Python data structure to
        different formats like HTML, JUnit XML.

    Parameter 'test_result_ext' format:

    u'uARM': {   u'LPC1768': {   'MBED_2': {   0: {   'copy_method': 'shutils.copy()',
                                                      'duration': 20,
                                                      'elapsed_time': 1.7929999828338623,
                                                      'output': 'Host test instrumentation on ...\r\n',
                                                      'result': 'OK',