111458Sandreas.hansson@arm.com# Copyright (c) 2016 ARM Limited
211458Sandreas.hansson@arm.com# All rights reserved.
311458Sandreas.hansson@arm.com#
411458Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall
511458Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual
611458Sandreas.hansson@arm.com# property including but not limited to intellectual property relating
711458Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software
811458Sandreas.hansson@arm.com# licensed hereunder.  You may use the software subject to the license
911458Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated
1011458Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software,
1111458Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form.
1211458Sandreas.hansson@arm.com#
1311457SN/A# Copyright (c) 2015 Jason Lowe-Power
1411457SN/A# All rights reserved.
1511457SN/A#
1611457SN/A# Redistribution and use in source and binary forms, with or without
1711457SN/A# modification, are permitted provided that the following conditions are
1811457SN/A# met: redistributions of source code must retain the above copyright
1911457SN/A# notice, this list of conditions and the following disclaimer;
2011457SN/A# redistributions in binary form must reproduce the above copyright
2111457SN/A# notice, this list of conditions and the following disclaimer in the
2211457SN/A# documentation and/or other materials provided with the distribution;
2311457SN/A# neither the name of the copyright holders nor the names of its
2411457SN/A# contributors may be used to endorse or promote products derived from
2511457SN/A# this software without specific prior written permission.
2611457SN/A#
2711457SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2811457SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2911457SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3011457SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3111457SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3211457SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3311457SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3411457SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3511457SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3611457SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3711457SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3811457SN/A#
3911457SN/A# Authors: Jason Lowe-Power
4011458Sandreas.hansson@arm.com#          Andreas Hansson
4111105SN/A
4211720Sandreas.hansson@arm.comimport m5
4311720Sandreas.hansson@arm.comfrom m5.objects import *
4411720Sandreas.hansson@arm.com
4511720Sandreas.hansson@arm.com# the traffic generator is only available if we have protobuf support,
4611720Sandreas.hansson@arm.com# so potentially skip this test
4711720Sandreas.hansson@arm.comrequire_sim_object("TrafficGen")
4811720Sandreas.hansson@arm.com
4911458Sandreas.hansson@arm.com# A wrapper around configs/example/memcheck.py
5011105SN/A
5111105SN/A# For some reason, this is implicitly needed by run.py
5211105SN/Aroot = None
5311105SN/A
5411105SN/Adef run_test(root):
5511105SN/A        # Called from tests/run.py
5611105SN/A
5711458Sandreas.hansson@arm.com        import sys
5813619Sandreas.sandberg@arm.com        argv = [
5913619Sandreas.sandberg@arm.com                sys.argv[0],
6013619Sandreas.sandberg@arm.com                '-m %d' % maxtick,
6113619Sandreas.sandberg@arm.com        ]
6211458Sandreas.hansson@arm.com
6311105SN/A        # Execute the script we are wrapping
6413619Sandreas.sandberg@arm.com        run_config('configs/example/memcheck.py', argv=argv)
65