mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-15 15:28:19 +00:00
26 lines
544 B
Go
26 lines
544 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
|
|
"github.com/ledgerwatch/log/v3"
|
|
)
|
|
|
|
func executeTest(p string) (bool, error) {
|
|
log.Root().SetHandler(log.LvlFilterHandler(log.LvlCrit, log.StderrHandler))
|
|
initialPath, err := os.Getwd()
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
var implemented bool
|
|
var fn testFunc
|
|
os.Chdir(p)
|
|
if fn, implemented = TestCollection[path.Join(testName, caseName)]; implemented {
|
|
err = fn()
|
|
}
|
|
os.Chdir(initialPath)
|
|
log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StderrHandler))
|
|
return implemented, err
|
|
}
|