aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethtest/main.go
diff options
context:
space:
mode:
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)
}