Add testharness mkdir function.

This commit is contained in:
monopole
2021-04-23 11:09:34 -07:00
parent 06add3ab35
commit cf3a125940

View File

@@ -7,6 +7,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
@@ -93,6 +94,12 @@ func (th *HarnessEnhanced) GetRoot() string {
return th.ldr.Root()
}
func (th *HarnessEnhanced) MkDir(path string) string {
dir := filepath.Join(th.ldr.Root(), path)
th.GetFSys().Mkdir(dir)
return dir
}
func (th *HarnessEnhanced) Reset() {
if th.shouldWipeLdrRoot {
if !strings.HasPrefix(th.ldr.Root(), os.TempDir()) {