2016-07-10 20:58:43 +08:00
|
|
|
package torrent
|
|
|
|
|
|
|
|
import (
|
2017-09-18 10:14:16 +08:00
|
|
|
"log"
|
2016-07-10 20:58:43 +08:00
|
|
|
"os"
|
|
|
|
"testing"
|
2020-02-21 09:58:47 +08:00
|
|
|
|
|
|
|
_ "github.com/anacrolix/envpprof"
|
2016-07-10 20:58:43 +08:00
|
|
|
)
|
|
|
|
|
2017-09-18 10:14:16 +08:00
|
|
|
func init() {
|
2018-02-11 12:14:31 +08:00
|
|
|
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
2017-11-07 13:00:08 +08:00
|
|
|
}
|
|
|
|
|
2016-07-10 20:58:43 +08:00
|
|
|
func TestMain(m *testing.M) {
|
2020-02-20 10:57:24 +08:00
|
|
|
TestingTempDir.Init("torrent.test")
|
2016-07-10 20:58:43 +08:00
|
|
|
code := m.Run()
|
2020-02-20 10:57:24 +08:00
|
|
|
TestingTempDir.RemoveAll()
|
2016-07-10 20:58:43 +08:00
|
|
|
// select {}
|
|
|
|
os.Exit(code)
|
|
|
|
}
|