memcheck.py revision 11458
19380SAndreas.Sandberg@ARM.com# Copyright (c) 2016 ARM Limited 29380SAndreas.Sandberg@ARM.com# All rights reserved. 39380SAndreas.Sandberg@ARM.com# 49380SAndreas.Sandberg@ARM.com# The license below extends only to copyright in the software and shall 59380SAndreas.Sandberg@ARM.com# not be construed as granting a license to any other intellectual 69380SAndreas.Sandberg@ARM.com# property including but not limited to intellectual property relating 79380SAndreas.Sandberg@ARM.com# to a hardware implementation of the functionality of the software 89380SAndreas.Sandberg@ARM.com# licensed hereunder. You may use the software subject to the license 99380SAndreas.Sandberg@ARM.com# terms below provided that you ensure that this notice is replicated 109380SAndreas.Sandberg@ARM.com# unmodified and in its entirety in all distributions of the software, 119380SAndreas.Sandberg@ARM.com# modified or unmodified, in source code or in binary form. 129380SAndreas.Sandberg@ARM.com# 139380SAndreas.Sandberg@ARM.com# Copyright (c) 2015 Jason Lowe-Power 149380SAndreas.Sandberg@ARM.com# All rights reserved. 159380SAndreas.Sandberg@ARM.com# 169380SAndreas.Sandberg@ARM.com# Redistribution and use in source and binary forms, with or without 179380SAndreas.Sandberg@ARM.com# modification, are permitted provided that the following conditions are 189380SAndreas.Sandberg@ARM.com# met: redistributions of source code must retain the above copyright 199380SAndreas.Sandberg@ARM.com# notice, this list of conditions and the following disclaimer; 209380SAndreas.Sandberg@ARM.com# redistributions in binary form must reproduce the above copyright 219380SAndreas.Sandberg@ARM.com# notice, this list of conditions and the following disclaimer in the 229380SAndreas.Sandberg@ARM.com# documentation and/or other materials provided with the distribution; 239380SAndreas.Sandberg@ARM.com# neither the name of the copyright holders nor the names of its 249380SAndreas.Sandberg@ARM.com# contributors may be used to endorse or promote products derived from 259380SAndreas.Sandberg@ARM.com# this software without specific prior written permission. 269380SAndreas.Sandberg@ARM.com# 279380SAndreas.Sandberg@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 289380SAndreas.Sandberg@ARM.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 299380SAndreas.Sandberg@ARM.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 309380SAndreas.Sandberg@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 319380SAndreas.Sandberg@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 329380SAndreas.Sandberg@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 339380SAndreas.Sandberg@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 349380SAndreas.Sandberg@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 359380SAndreas.Sandberg@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 369380SAndreas.Sandberg@ARM.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 379380SAndreas.Sandberg@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 389380SAndreas.Sandberg@ARM.com# 399380SAndreas.Sandberg@ARM.com# Authors: Jason Lowe-Power 409380SAndreas.Sandberg@ARM.com# Andreas Hansson 419380SAndreas.Sandberg@ARM.com 429380SAndreas.Sandberg@ARM.com# A wrapper around configs/example/memcheck.py 439380SAndreas.Sandberg@ARM.com 449380SAndreas.Sandberg@ARM.com# For some reason, this is implicitly needed by run.py 459380SAndreas.Sandberg@ARM.comroot = None 469380SAndreas.Sandberg@ARM.com 479380SAndreas.Sandberg@ARM.comdef run_test(root): 489380SAndreas.Sandberg@ARM.com # Called from tests/run.py 499380SAndreas.Sandberg@ARM.com 509380SAndreas.Sandberg@ARM.com # The path to this script is the only parameter. Delete it so 519380SAndreas.Sandberg@ARM.com # we can execute the script that we want to execute. 529380SAndreas.Sandberg@ARM.com import sys 539380SAndreas.Sandberg@ARM.com del sys.argv[1:] 549380SAndreas.Sandberg@ARM.com 559380SAndreas.Sandberg@ARM.com # Add a specific max tick 569380SAndreas.Sandberg@ARM.com sys.argv.append('-m %d' % maxtick) 579380SAndreas.Sandberg@ARM.com 589380SAndreas.Sandberg@ARM.com # Execute the script we are wrapping 599380SAndreas.Sandberg@ARM.com execfile('configs/example/memcheck.py', globals()) 609380SAndreas.Sandberg@ARM.com