build: improve build tests
This commit is contained in:
parent
be373dfb80
commit
70b043cdae
2 changed files with 3 additions and 0 deletions
|
|
@ -98,6 +98,7 @@ func BuildUserspace(profile string) string {
|
||||||
return profile
|
return profile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert all profiles to abi 3.0 compatibility
|
||||||
func BuildABI3(profile string) string {
|
func BuildABI3(profile string) string {
|
||||||
for _, abi4t3 := range regAbi4To3 {
|
for _, abi4t3 := range regAbi4To3 {
|
||||||
profile = abi4t3.Regex.ReplaceAllLiteralString(profile, abi4t3.Repl)
|
profile = abi4t3.Regex.ReplaceAllLiteralString(profile, abi4t3.Repl)
|
||||||
|
|
@ -105,6 +106,7 @@ func BuildABI3(profile string) string {
|
||||||
return profile
|
return profile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent unconfined transitions in profile rules
|
||||||
func BuildFullSystemPolicy(profile string) string {
|
func BuildFullSystemPolicy(profile string) string {
|
||||||
for _, full := range regFullSystemPolicy {
|
for _, full := range regFullSystemPolicy {
|
||||||
profile = full.Regex.ReplaceAllString(profile, full.Repl)
|
profile = full.Regex.ReplaceAllString(profile, full.Repl)
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ func Test_PreBuild(t *testing.T) {
|
||||||
Distribution = tt.dist
|
Distribution = tt.dist
|
||||||
if tt.full {
|
if tt.full {
|
||||||
Prepares = append(Prepares, SetFullSystemPolicy)
|
Prepares = append(Prepares, SetFullSystemPolicy)
|
||||||
|
Builds = append(Builds, BuildFullSystemPolicy)
|
||||||
}
|
}
|
||||||
if tt.complain {
|
if tt.complain {
|
||||||
Builds = append(Builds, BuildComplain)
|
Builds = append(Builds, BuildComplain)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue