mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-15 15:28:19 +00:00
23 lines
357 B
Go
23 lines
357 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"path"
|
||
|
)
|
||
|
|
||
|
func executeTest(p string) (bool, error) {
|
||
|
|
||
|
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)
|
||
|
return implemented, err
|
||
|
}
|