Discussion:
[gem5-dev] Change in gem5/gem5[master]: base: Change the unit test binary names to use .test, and to be consi...
(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/+/14677


Change subject: base: Change the unit test binary names to use .test, and
to be consistent.
......................................................................

base: Change the unit test binary names to use .test, and to be consistent.

Most tests were named *test where * was the base name of the file being
tested, but some were named differently based on, for instance, the
name of the class that file implemented.

This change makes all the test names consistently based off of the file
name they test, and also brings in the new .test convention to make
them easier to read.

Now, if you have a file like fiber.cc you want to test, you'd have a
unit test in a file called fiber.test.cc, and a test called fiber.test
which would generate a binary called fiber.test.opt, fiber.test.debug,
etc.

Change-Id: I61d59016090371a9bae72066e7473a34aecea21f
---
M src/base/SConscript
1 file changed, 10 insertions(+), 10 deletions(-)



diff --git a/src/base/SConscript b/src/base/SConscript
index 6735903..d1ebbc9 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', 'cprintf.test.cc')
+GTest('cprintf.test', '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', 'fiber.test.cc', 'fiber.cc')
-GTest('coroutinetest', 'coroutine.test.cc', 'fiber.cc')
+GTest('fiber.test', 'fiber.test.cc', 'fiber.cc')
+GTest('coroutine.test', 'coroutine.test.cc', 'fiber.cc')
Source('framebuffer.cc')
Source('hostinfo.cc')
Source('inet.cc')
Source('inifile.cc')
-GTest('inifiletest', 'inifile.test.cc', 'inifile.cc', 'str.cc')
+GTest('inifile.test', 'inifile.test.cc', 'inifile.cc', 'str.cc')
Source('intmath.cc')
Source('logging.cc')
Source('match.cc')
Source('output.cc')
Source('pixel.cc')
-GTest('pixeltest', 'pixel.test.cc', 'pixel.cc')
+GTest('pixel.test', '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', 'trie.test.cc')
+GTest('trie.test', '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', 'bitunion.test.cc')
-GTest('CircleBufTest', 'circlebuf.test.cc')
+GTest('addr_range.test', 'addr_range.test.cc')
+GTest('addr_range_map.test', 'addr_range_map.test.cc')
+GTest('bitunion.test', 'bitunion.test.cc')
+GTest('circlebuf.test', 'circlebuf.test.cc')

DebugFlag('Annotate', "State machine annotation debugging")
DebugFlag('AnnotateQ', "State machine annotation queue debugging")
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14677
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: I61d59016090371a9bae72066e7473a34aecea21f
Gerrit-Change-Number: 14677
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-MessageType: newchange
Gabe Black (Gerrit)
2018-11-29 12:21:00 UTC
Permalink
Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/14677 )

Change subject: base: Change the unit test binary names to use .test, and
to be consistent.
......................................................................

base: Change the unit test binary names to use .test, and to be consistent.

Most tests were named *test where * was the base name of the file being
tested, but some were named differently based on, for instance, the
name of the class that file implemented.

This change makes all the test names consistently based off of the file
name they test, and also brings in the new .test convention to make
them easier to read.

Now, if you have a file like fiber.cc you want to test, you'd have a
unit test in a file called fiber.test.cc, and a test called fiber.test
which would generate a binary called fiber.test.opt, fiber.test.debug,
etc.

Change-Id: I61d59016090371a9bae72066e7473a34aecea21f
Reviewed-on: https://gem5-review.googlesource.com/c/14677
Reviewed-by: Giacomo Travaglini <***@arm.com>
Maintainer: Gabe Black <***@google.com>
---
M src/base/SConscript
1 file changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/src/base/SConscript b/src/base/SConscript
index 6735903..d1ebbc9 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', 'cprintf.test.cc')
+GTest('cprintf.test', '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', 'fiber.test.cc', 'fiber.cc')
-GTest('coroutinetest', 'coroutine.test.cc', 'fiber.cc')
+GTest('fiber.test', 'fiber.test.cc', 'fiber.cc')
+GTest('coroutine.test', 'coroutine.test.cc', 'fiber.cc')
Source('framebuffer.cc')
Source('hostinfo.cc')
Source('inet.cc')
Source('inifile.cc')
-GTest('inifiletest', 'inifile.test.cc', 'inifile.cc', 'str.cc')
+GTest('inifile.test', 'inifile.test.cc', 'inifile.cc', 'str.cc')
Source('intmath.cc')
Source('logging.cc')
Source('match.cc')
Source('output.cc')
Source('pixel.cc')
-GTest('pixeltest', 'pixel.test.cc', 'pixel.cc')
+GTest('pixel.test', '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', 'trie.test.cc')
+GTest('trie.test', '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', 'bitunion.test.cc')
-GTest('CircleBufTest', 'circlebuf.test.cc')
+GTest('addr_range.test', 'addr_range.test.cc')
+GTest('addr_range_map.test', 'addr_range_map.test.cc')
+GTest('bitunion.test', 'bitunion.test.cc')
+GTest('circlebuf.test', 'circlebuf.test.cc')

DebugFlag('Annotate', "State machine annotation debugging")
DebugFlag('AnnotateQ', "State machine annotation queue debugging")
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14677
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: I61d59016090371a9bae72066e7473a34aecea21f
Gerrit-Change-Number: 14677
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
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...