util: Add a unit test for the m5 util's "sum" command.
authorGabe Black <gabeblack@google.com>
Tue, 7 Apr 2020 08:18:42 +0000 (01:18 -0700)
committerGabe Black <gabeblack@google.com>
Mon, 27 Jul 2020 08:28:58 +0000 (08:28 +0000)
commitce90cceb25e05e123015ea5602de2fe31c13cade
treeb577ebe2fc2d2053c715987e40f9c37c088fe606
parent8a4fcdee4dce240c4a2f8369f0aba8733234245b
util: Add a unit test for the m5 util's "sum" command.

This change adds the plumbing for and then implements a unit test for
the "sum" command. Despite the fact that this command is very simple,
there are a few things to verify.

1. That args are passed in the right positions.
2. That the number of arguments is checked correctly.
3. That the output to std::cerr is correct.

Change-Id: I71cd473b78fb710cac94df2d70c8d6dc76e5a037
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27566
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
util/m5/src/SConscript.native
util/m5/src/command/SConscript.native [new file with mode: 0644]
util/m5/src/command/sum.test.cc [new file with mode: 0644]