test.py revision 3198
12391SN/A# Copyright (c) 2006 The Regents of The University of Michigan
28931Sandreas.hansson@arm.com# All rights reserved.
38931Sandreas.hansson@arm.com#
48931Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without
58931Sandreas.hansson@arm.com# modification, are permitted provided that the following conditions are
68931Sandreas.hansson@arm.com# met: redistributions of source code must retain the above copyright
78931Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer;
88931Sandreas.hansson@arm.com# redistributions in binary form must reproduce the above copyright
98931Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer in the
108931Sandreas.hansson@arm.com# documentation and/or other materials provided with the distribution;
118931Sandreas.hansson@arm.com# neither the name of the copyright holders nor the names of its
128931Sandreas.hansson@arm.com# contributors may be used to endorse or promote products derived from
138931Sandreas.hansson@arm.com# this software without specific prior written permission.
142391SN/A#
152391SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
162391SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
172391SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
182391SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
192391SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
202391SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
212391SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
222391SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
232391SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
242391SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
252391SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
262391SN/A#
272391SN/A# Authors: Ron Dreslinski
282391SN/A
292391SN/A# workload
302391SN/Abenchmarks = [
312391SN/A    "tests/test-progs/hello/bin/alpha/linux/hello", "'hello'",
322391SN/A    "tests/test-progs/hello/bin/alpha/linux/hello", "'hello'",
332391SN/A    "tests/test-progs/hello/bin/alpha/linux/hello", "'hello'",
342391SN/A    "tests/test-progs/hello/bin/alpha/linux/hello", "'hello'",
352391SN/A    ]
362391SN/A
372391SN/Afor i, cpu in zip(range(len(cpus)), root.system.cpu):
382391SN/A    p            = LiveProcess()
392665SN/A    p.executable = benchmarks[i*2]
402665SN/A    p.cmd        = benchmarks[(i*2)+1]
418931Sandreas.hansson@arm.com    root.system.cpu[i].workload = p
422391SN/A    root.system.cpu[i].max_insts_all_threads = 10000000
432391SN/A#root.system.cpu.workload = LiveProcess(cmd = 'hello',
448931Sandreas.hansson@arm.com #                                      executable = binpath('hello'))
458931Sandreas.hansson@arm.com