mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
ci: rm "skip on CentOS 7" kludges
We no longer test on CentOS 7. Remove the internal/testutil package as it has no other uses. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
package testutil
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"sync"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var (
|
||||
centosVer string
|
||||
centosVerOnce sync.Once
|
||||
)
|
||||
|
||||
func centosVersion() string {
|
||||
centosVerOnce.Do(func() {
|
||||
ver, _ := exec.Command("rpm", "-q", "--qf", "%{version}", "centos-release").CombinedOutput()
|
||||
centosVer = string(ver)
|
||||
})
|
||||
return centosVer
|
||||
}
|
||||
|
||||
func SkipOnCentOS(t *testing.T, reason string, versions ...int) {
|
||||
t.Helper()
|
||||
for _, v := range versions {
|
||||
if vstr := strconv.Itoa(v); centosVersion() == vstr {
|
||||
t.Skip(reason + " on CentOS " + vstr)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user