瀏覽代碼

Merge pull request #1479 from tgerring/ethtest

Update ethtest default path for BlockTests
Jeffrey Wilcke 10 年之前
父節點
當前提交
97cdf84899
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      cmd/ethtest/main.go

+ 8 - 2
cmd/ethtest/main.go

@@ -36,6 +36,7 @@ var (
 	defaultTest     = "all"
 	defaultDir      = "."
 	allTests        = []string{"BlockTests", "StateTests", "TransactionTests", "VMTests", "RLPTests"}
+	testDirMapping  = map[string]string{"BlockTests": "BlockchainTests"}
 	skipTests       = []string{}
 
 	TestFlag = cli.StringFlag{
@@ -135,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)
 		}