aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethtest/main.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-06 00:08:52 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-08-06 00:08:52 +0800
commit80e5f507130a926ea62dde07c2b98d6f8a0ba3e2 (patch)
tree750fe404c14b6f5e8ef03a07cf3357787c6c9683 /cmd/ethtest/main.go
parent98f4c936f25de27dbc90f36f2c1ffd1f23b114e9 (diff)
parent26f838796b8793f38268f3a8911ec2b71913153c (diff)
downloadgo-tangerine-80e5f507130a926ea62dde07c2b98d6f8a0ba3e2.tar
go-tangerine-80e5f507130a926ea62dde07c2b98d6f8a0ba3e2.tar.gz
go-tangerine-80e5f507130a926ea62dde07c2b98d6f8a0ba3e2.tar.bz2
go-tangerine-80e5f507130a926ea62dde07c2b98d6f8a0ba3e2.tar.lz
go-tangerine-80e5f507130a926ea62dde07c2b98d6f8a0ba3e2.tar.xz
go-tangerine-80e5f507130a926ea62dde07c2b98d6f8a0ba3e2.tar.zst
go-tangerine-80e5f507130a926ea62dde07c2b98d6f8a0ba3e2.zip
Merge branch 'develop'
Diffstat (limited to 'cmd/ethtest/main.go')
-rw-r--r--cmd/ethtest/main.go18
1 files changed, 13 insertions, 5 deletions
diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go
index 61276b177..5429cab31 100644
--- a/cmd/ethtest/main.go
+++ b/cmd/ethtest/main.go
@@ -8,11 +8,11 @@
//
// go-ethereum is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
-// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
+// along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
// ethtest executes Ethereum JSON tests.
package main
@@ -35,7 +35,8 @@ var (
testExtension = ".json"
defaultTest = "all"
defaultDir = "."
- allTests = []string{"BlockTests", "StateTests", "TransactionTests", "VMTests"}
+ allTests = []string{"BlockTests", "StateTests", "TransactionTests", "VMTests", "RLPTests"}
+ testDirMapping = map[string]string{"BlockTests": "BlockchainTests"}
skipTests = []string{}
TestFlag = cli.StringFlag{
@@ -75,6 +76,8 @@ func runTestWithReader(test string, r io.Reader) error {
err = tests.RunTransactionTestsWithReader(r, skipTests)
case "vm", "vmtest", "vmtests":
err = tests.RunVmTestWithReader(r, skipTests)
+ case "rlp", "rlptest", "rlptests":
+ err = tests.RunRLPTestWithReader(r, skipTests)
default:
err = fmt.Errorf("Invalid test type specified: %v", test)
}
@@ -133,8 +136,13 @@ func runSuite(test, file string) {
var err error
var files []string
if test == defaultTest {
- files, err = getFiles(filepath.Join(file, curTest))
-
+ // check if we have an explicit directory mapping for the test
+ if _, ok := testDirMapping[curTest]; ok {
+ files, err = getFiles(filepath.Join(file, testDirMapping[curTest]))
+ } else {
+ // otherwise assume test name
+ files, err = getFiles(filepath.Join(file, curTest))
+ }
} else {
files, err = getFiles(file)
}