Skip to content

Commit

Permalink
cleanup files
Browse files Browse the repository at this point in the history
  • Loading branch information
hidetatz committed Oct 18, 2022
1 parent 37d744e commit 0ce9e54
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 378 deletions.
19 changes: 3 additions & 16 deletions e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main

import (
"io"
"os"
"path/filepath"
"runtime"
"testing"
Expand Down Expand Up @@ -157,27 +155,16 @@ func TestE2E(t *testing.T) {

for _, tc := range tests {
t.Run(tc, func(t *testing.T) {
f, err := os.Open(filepath.Join("./tests/", tc))
if err != nil {
t.Fatalf("open file: %s, %s", tc, err)
}
defer f.Close()

buff, err := io.ReadAll(f)
if err != nil {
t.Fatalf("read file: %s, %s", tc, err)
}

emulator, err := New(buff)
cpu, err := initCPU(filepath.Join("./tests/", tc))
if err != nil {
t.Fatalf("initialize RV: %s, %s", tc, err)
}

if emulator.tohost == 0 {
if cpu.tohost == 0 {
t.Fatalf("unexpected error: tohost is 0 but expected some address in the binary! %s", tc)
}

if err := emulator.Start(); err != nil {
if err := cpu.Start(); err != nil {
t.Errorf("fail to run: %s, %s", tc, err)
}

Expand Down
304 changes: 0 additions & 304 deletions elf.go

This file was deleted.

Loading

0 comments on commit 0ce9e54

Please sign in to comment.