Discussion:
[gem5-dev] Change in gem5/gem5[master]: base: Rename unit test cc files to be *.test.cc.
(too old to reply)
Gabe Black (Gerrit)
2018-11-29 01:47:17 UTC
Permalink
Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/14676


Change subject: base: Rename unit test cc files to be *.test.cc.
......................................................................

base: Rename unit test cc files to be *.test.cc.

This makes the name easier to read, looks ok if the file is named with
underscores between words or not, is easy to grep for, and shouldn't
introduce any ambiguities in the file names.

Change-Id: I34b7bcccea2d87c10c0de417dd5e3ef27c4b5666
---
M src/base/SConscript
R src/base/addr_range.test.cc
R src/base/addr_range_map.test.cc
R src/base/bitunion.test.cc
R src/base/circlebuf.test.cc
R src/base/coroutine.test.cc
R src/base/cprintf.test.cc
R src/base/fiber.test.cc
R src/base/inifile.test.cc
R src/base/pixel.test.cc
R src/base/trie.test.cc
11 files changed, 10 insertions(+), 10 deletions(-)



diff --git a/src/base/SConscript b/src/base/SConscript
index b0893a1..6735903 100644
--- a/src/base/SConscript
+++ b/src/base/SConscript
@@ -40,26 +40,26 @@
Source('bmpwriter.cc')
Source('callback.cc')
Source('cprintf.cc', add_tags='gtest lib')
-GTest('cprintftest', 'cprintftest.cc')
+GTest('cprintftest', 'cprintf.test.cc')
Source('debug.cc')
if env['USE_FENV']:
Source('fenv.c')
if env['USE_PNG']:
Source('pngwriter.cc')
Source('fiber.cc')
-GTest('fibertest', 'fibertest.cc', 'fiber.cc')
-GTest('coroutinetest', 'coroutinetest.cc', 'fiber.cc')
+GTest('fibertest', 'fiber.test.cc', 'fiber.cc')
+GTest('coroutinetest', 'coroutine.test.cc', 'fiber.cc')
Source('framebuffer.cc')
Source('hostinfo.cc')
Source('inet.cc')
Source('inifile.cc')
-GTest('inifiletest', 'inifiletest.cc', 'inifile.cc', 'str.cc')
+GTest('inifiletest', 'inifile.test.cc', 'inifile.cc', 'str.cc')
Source('intmath.cc')
Source('logging.cc')
Source('match.cc')
Source('output.cc')
Source('pixel.cc')
-GTest('pixeltest', 'pixeltest.cc', 'pixel.cc')
+GTest('pixeltest', 'pixel.test.cc', 'pixel.cc')
Source('pollevent.cc')
Source('random.cc')
if env['TARGET_ISA'] != 'null':
@@ -69,7 +69,7 @@
Source('str.cc')
Source('time.cc')
Source('trace.cc')
-GTest('trietest', 'trietest.cc')
+GTest('trietest', 'trie.test.cc')
Source('types.cc')

Source('loader/aout_object.cc')
@@ -83,10 +83,10 @@

Source('stats/text.cc')

-GTest('addr_range_test', 'addr_range_test.cc')
-GTest('AddrRangeMapTest', 'addr_range_map_test.cc')
-GTest('bituniontest', 'bituniontest.cc')
-GTest('CircleBufTest', 'circlebuftest.cc')
+GTest('addr_range_test', 'addr_range.test.cc')
+GTest('AddrRangeMapTest', 'addr_range_map.test.cc')
+GTest('bituniontest', 'bitunion.test.cc')
+GTest('CircleBufTest', 'circlebuf.test.cc')

DebugFlag('Annotate', "State machine annotation debugging")
DebugFlag('AnnotateQ', "State machine annotation queue debugging")
diff --git a/src/base/addr_range_test.cc b/src/base/addr_range.test.cc
similarity index 100%
rename from src/base/addr_range_test.cc
rename to src/base/addr_range.test.cc
diff --git a/src/base/addr_range_map_test.cc
b/src/base/addr_range_map.test.cc
similarity index 100%
rename from src/base/addr_range_map_test.cc
rename to src/base/addr_range_map.test.cc
diff --git a/src/base/bituniontest.cc b/src/base/bitunion.test.cc
similarity index 100%
rename from src/base/bituniontest.cc
rename to src/base/bitunion.test.cc
diff --git a/src/base/circlebuftest.cc b/src/base/circlebuf.test.cc
similarity index 100%
rename from src/base/circlebuftest.cc
rename to src/base/circlebuf.test.cc
diff --git a/src/base/coroutinetest.cc b/src/base/coroutine.test.cc
similarity index 100%
rename from src/base/coroutinetest.cc
rename to src/base/coroutine.test.cc
diff --git a/src/base/cprintftest.cc b/src/base/cprintf.test.cc
similarity index 100%
rename from src/base/cprintftest.cc
rename to src/base/cprintf.test.cc
diff --git a/src/base/fibertest.cc b/src/base/fiber.test.cc
similarity index 100%
rename from src/base/fibertest.cc
rename to src/base/fiber.test.cc
diff --git a/src/base/inifiletest.cc b/src/base/inifile.test.cc
similarity index 100%
rename from src/base/inifiletest.cc
rename to src/base/inifile.test.cc
diff --git a/src/base/pixeltest.cc b/src/base/pixel.test.cc
similarity index 100%
rename from src/base/pixeltest.cc
rename to src/base/pixel.test.cc
diff --git a/src/base/trietest.cc b/src/base/trie.test.cc
similarity index 100%
rename from src/base/trietest.cc
rename to src/base/trie.test.cc
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14676
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I34b7bcccea2d87c10c0de417dd5e3ef27c4b5666
Gerrit-Change-Number: 14676
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-MessageType: newchange
Gabe Black (Gerrit)
2018-11-29 12:20:07 UTC
Permalink
Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/14676 )

Change subject: base: Rename unit test cc files to be *.test.cc.
......................................................................

base: Rename unit test cc files to be *.test.cc.

This makes the name easier to read, looks ok if the file is named with
underscores between words or not, is easy to grep for, and shouldn't
introduce any ambiguities in the file names.

Change-Id: I34b7bcccea2d87c10c0de417dd5e3ef27c4b5666
Reviewed-on: https://gem5-review.googlesource.com/c/14676
Reviewed-by: Giacomo Travaglini <***@arm.com>
Reviewed-by: Daniel Carvalho <***@yahoo.com.br>
Maintainer: Gabe Black <***@google.com>
---
M src/base/SConscript
R src/base/addr_range.test.cc
R src/base/addr_range_map.test.cc
R src/base/bitunion.test.cc
R src/base/circlebuf.test.cc
R src/base/coroutine.test.cc
R src/base/cprintf.test.cc
R src/base/fiber.test.cc
R src/base/inifile.test.cc
R src/base/pixel.test.cc
R src/base/trie.test.cc
11 files changed, 10 insertions(+), 10 deletions(-)

Approvals:
Giacomo Travaglini: Looks good to me, approved
Daniel Carvalho: Looks good to me, approved
Gabe Black: Looks good to me, approved



diff --git a/src/base/SConscript b/src/base/SConscript
index b0893a1..6735903 100644
--- a/src/base/SConscript
+++ b/src/base/SConscript
@@ -40,26 +40,26 @@
Source('bmpwriter.cc')
Source('callback.cc')
Source('cprintf.cc', add_tags='gtest lib')
-GTest('cprintftest', 'cprintftest.cc')
+GTest('cprintftest', 'cprintf.test.cc')
Source('debug.cc')
if env['USE_FENV']:
Source('fenv.c')
if env['USE_PNG']:
Source('pngwriter.cc')
Source('fiber.cc')
-GTest('fibertest', 'fibertest.cc', 'fiber.cc')
-GTest('coroutinetest', 'coroutinetest.cc', 'fiber.cc')
+GTest('fibertest', 'fiber.test.cc', 'fiber.cc')
+GTest('coroutinetest', 'coroutine.test.cc', 'fiber.cc')
Source('framebuffer.cc')
Source('hostinfo.cc')
Source('inet.cc')
Source('inifile.cc')
-GTest('inifiletest', 'inifiletest.cc', 'inifile.cc', 'str.cc')
+GTest('inifiletest', 'inifile.test.cc', 'inifile.cc', 'str.cc')
Source('intmath.cc')
Source('logging.cc')
Source('match.cc')
Source('output.cc')
Source('pixel.cc')
-GTest('pixeltest', 'pixeltest.cc', 'pixel.cc')
+GTest('pixeltest', 'pixel.test.cc', 'pixel.cc')
Source('pollevent.cc')
Source('random.cc')
if env['TARGET_ISA'] != 'null':
@@ -69,7 +69,7 @@
Source('str.cc')
Source('time.cc')
Source('trace.cc')
-GTest('trietest', 'trietest.cc')
+GTest('trietest', 'trie.test.cc')
Source('types.cc')

Source('loader/aout_object.cc')
@@ -83,10 +83,10 @@

Source('stats/text.cc')

-GTest('addr_range_test', 'addr_range_test.cc')
-GTest('AddrRangeMapTest', 'addr_range_map_test.cc')
-GTest('bituniontest', 'bituniontest.cc')
-GTest('CircleBufTest', 'circlebuftest.cc')
+GTest('addr_range_test', 'addr_range.test.cc')
+GTest('AddrRangeMapTest', 'addr_range_map.test.cc')
+GTest('bituniontest', 'bitunion.test.cc')
+GTest('CircleBufTest', 'circlebuf.test.cc')

DebugFlag('Annotate', "State machine annotation debugging")
DebugFlag('AnnotateQ', "State machine annotation queue debugging")
diff --git a/src/base/addr_range_test.cc b/src/base/addr_range.test.cc
similarity index 100%
rename from src/base/addr_range_test.cc
rename to src/base/addr_range.test.cc
diff --git a/src/base/addr_range_map_test.cc
b/src/base/addr_range_map.test.cc
similarity index 100%
rename from src/base/addr_range_map_test.cc
rename to src/base/addr_range_map.test.cc
diff --git a/src/base/bituniontest.cc b/src/base/bitunion.test.cc
similarity index 100%
rename from src/base/bituniontest.cc
rename to src/base/bitunion.test.cc
diff --git a/src/base/circlebuftest.cc b/src/base/circlebuf.test.cc
similarity index 100%
rename from src/base/circlebuftest.cc
rename to src/base/circlebuf.test.cc
diff --git a/src/base/coroutinetest.cc b/src/base/coroutine.test.cc
similarity index 100%
rename from src/base/coroutinetest.cc
rename to src/base/coroutine.test.cc
diff --git a/src/base/cprintftest.cc b/src/base/cprintf.test.cc
similarity index 100%
rename from src/base/cprintftest.cc
rename to src/base/cprintf.test.cc
diff --git a/src/base/fibertest.cc b/src/base/fiber.test.cc
similarity index 100%
rename from src/base/fibertest.cc
rename to src/base/fiber.test.cc
diff --git a/src/base/inifiletest.cc b/src/base/inifile.test.cc
similarity index 100%
rename from src/base/inifiletest.cc
rename to src/base/inifile.test.cc
diff --git a/src/base/pixeltest.cc b/src/base/pixel.test.cc
similarity index 100%
rename from src/base/pixeltest.cc
rename to src/base/pixel.test.cc
diff --git a/src/base/trietest.cc b/src/base/trie.test.cc
similarity index 100%
rename from src/base/trietest.cc
rename to src/base/trie.test.cc
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14676
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I34b7bcccea2d87c10c0de417dd5e3ef27c4b5666
Gerrit-Change-Number: 14676
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Daniel Carvalho <***@yahoo.com.br>
Gerrit-Reviewer: Gabe Black <***@google.com>
Gerrit-Reviewer: Giacomo Travaglini <***@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <***@lowepower.com>
Gerrit-MessageType: merged
Continue reading on narkive:
Loading...