summaryrefslogtreecommitdiff
path: root/src/unittest/initest.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-10-02 11:27:01 -0700
committerNathan Binkert <nate@binkert.org>2008-10-02 11:27:01 -0700
commitb25755993bbc04be0235975e2967533995a493f0 (patch)
tree3295891b4f535535dce20c2f51c4402aba025a2a /src/unittest/initest.cc
parent52493b27202fb61aaae74779ebcd91ca8f2bbc2c (diff)
downloadgem5-b25755993bbc04be0235975e2967533995a493f0.tar.xz
unittest: Add unit tests to the scons framework.
Also fix the unit tests so they actually compile correctly.
Diffstat (limited to 'src/unittest/initest.cc')
-rw-r--r--src/unittest/initest.cc20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/unittest/initest.cc b/src/unittest/initest.cc
index 8f53fce5c..67ac44874 100644
--- a/src/unittest/initest.cc
+++ b/src/unittest/initest.cc
@@ -68,32 +68,14 @@ main(int argc, char *argv[])
progname = argv[0];
- vector<char *> cppArgs;
-
- vector<char *> cpp_options;
- cpp_options.reserve(argc * 2);
-
for (int i = 1; i < argc; ++i) {
char *arg_str = argv[i];
// if arg starts with '-', parse as option,
// else treat it as a configuration file name and load it
if (arg_str[0] == '-') {
-
// switch on second char
switch (arg_str[1]) {
- case 'D':
- case 'U':
- case 'I':
- // cpp options: record & pass to cpp. Note that these
- // cannot have spaces, i.e., '-Dname=val' is OK, but
- // '-D name=val' is not. I don't consider this a
- // problem, since even though gnu cpp accepts the
- // latter, other cpp implementations do not (Tru64,
- // for one).
- cppArgs.push_back(arg_str);
- break;
-
case '-':
// command-line configuration parameter:
// '--<section>:<parameter>=<value>'
@@ -115,7 +97,7 @@ main(int argc, char *argv[])
else {
// no '-', treat as config file name
- if (!simConfigDB.loadCPP(arg_str, cppArgs)) {
+ if (!simConfigDB.load(arg_str)) {
cprintf("Error processing file %s\n", arg_str);
exit(1);
}