2 # Copyright (C) 2011, 2012 Purdue University
3 # Written by Gregor Richards
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met:
9 # 1. Redistributions of source code must retain the above copyright notice,
10 # this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright notice,
12 # this list of conditions and the following disclaimer in the documentation
13 # and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 # POSSIBILITY OF SUCH DAMAGE.
33 "amazon/chrome", "amazon/chrome-win", "amazon/firefox",
34 "amazon/firefox-win", "amazon/safari",
35 "facebook/chrome", "facebook/chrome-win", "facebook/firefox",
36 "facebook/firefox-win", "facebook/safari",
37 "google/chrome", "google/chrome-win", "google/firefox",
38 "google/firefox-win", "google/safari",
39 "twitter/chrome", "twitter/chrome-win", "twitter/firefox",
40 "twitter/firefox-win", "twitter/safari",
41 "yahoo/chrome", "yahoo/chrome-win", "yahoo/firefox",
42 "yahoo/firefox-win", "yahoo/safari",
47 "amazon/firefox": ["urm"],
48 "amazon/firefox-win": ["urm"],
49 "google/firefox": ["uem"],
50 "twitter/chrome-win": ["rem"]
53 if len(sys.argv) != 2:
54 print ("Use: python harness.py <JS executable>")
58 for benchmark in benchmarks:
60 if benchmark in modes:
61 bmode = modes[benchmark]
65 path = benchmark + '/' + ''.join(bmode) + '.js'
66 res = os.popen(js + " " + path).read()
70 print(benchmark + "\t" + res, end = '')