From f1a60906132fb816f80917d830b34df5e5d87ad4 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 5 Apr 2012 10:45:26 -0400 Subject: Ruby: Fix the example configurations option parsing This patch fixes the, currently broken, Ruby example scripts to reflect the changes in the parsing of command-line options. --- configs/example/ruby_direct_test.py | 2 ++ configs/example/ruby_mem_test.py | 2 ++ configs/example/ruby_network_test.py | 3 +++ configs/example/ruby_random_test.py | 2 ++ 4 files changed, 9 insertions(+) diff --git a/configs/example/ruby_direct_test.py b/configs/example/ruby_direct_test.py index 7f38d5431..53a1b6850 100644 --- a/configs/example/ruby_direct_test.py +++ b/configs/example/ruby_direct_test.py @@ -36,6 +36,7 @@ import os, optparse, sys addToPath('../common') addToPath('../ruby') +import Options import Ruby # Get paths we might need. It's expected this file is in m5/configs/example. @@ -44,6 +45,7 @@ config_root = os.path.dirname(config_path) m5_root = os.path.dirname(config_root) parser = optparse.OptionParser() +Options.addCommonOptions(parser) parser.add_option("-l", "--requests", metavar="N", default=100, help="Stop after N requests") diff --git a/configs/example/ruby_mem_test.py b/configs/example/ruby_mem_test.py index 20c25e833..3fec09c47 100644 --- a/configs/example/ruby_mem_test.py +++ b/configs/example/ruby_mem_test.py @@ -36,6 +36,7 @@ import os, optparse, sys addToPath('../common') addToPath('../ruby') +import Options import Ruby # Get paths we might need. It's expected this file is in m5/configs/example. @@ -44,6 +45,7 @@ config_root = os.path.dirname(config_path) m5_root = os.path.dirname(config_root) parser = optparse.OptionParser() +Options.addCommonOptions(parser) parser.add_option("-l", "--maxloads", metavar="N", default=0, help="Stop after N loads") diff --git a/configs/example/ruby_network_test.py b/configs/example/ruby_network_test.py index aa93acd2f..2d68a81ea 100644 --- a/configs/example/ruby_network_test.py +++ b/configs/example/ruby_network_test.py @@ -35,6 +35,8 @@ from m5.util import addToPath import os, optparse, sys addToPath('../common') addToPath('../ruby') + +import Options import Ruby # Get paths we might need. It's expected this file is in m5/configs/example. @@ -43,6 +45,7 @@ config_root = os.path.dirname(config_path) m5_root = os.path.dirname(config_root) parser = optparse.OptionParser() +Options.addCommonOptions(parser) parser.add_option("--synthetic", type="int", default=0, help="Synthetic Traffic type. 0 = Uniform Random,\ diff --git a/configs/example/ruby_random_test.py b/configs/example/ruby_random_test.py index 5e6d82372..11571a297 100644 --- a/configs/example/ruby_random_test.py +++ b/configs/example/ruby_random_test.py @@ -36,6 +36,7 @@ import os, optparse, sys addToPath('../common') addToPath('../ruby') +import Options import Ruby # Get paths we might need. It's expected this file is in m5/configs/example. @@ -44,6 +45,7 @@ config_root = os.path.dirname(config_path) m5_root = os.path.dirname(config_root) parser = optparse.OptionParser() +Options.addCommonOptions(parser) parser.add_option("-l", "--checks", metavar="N", default=100, help="Stop after N checks (loads)") -- cgit v1.2.3