Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(buildtool): add ios-build unit tests #1371

Merged
merged 5 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func CheckSingleCommand(cmd *execabs.Cmd, tee ExecExpectations) error {
return err
}
if err := CompareEnv(tee.Env, shellxtesting.CmdEnvironMinusOsEnviron(cmd)); err != nil {
return err
return fmt.Errorf("in %v: %w", tee.Argv, err)
}
return nil
}
Expand Down Expand Up @@ -253,12 +253,12 @@ func (*DependenciesCallCounter) XCRun(args ...string) string {
case "-sdk":
runtimex.Assert(len(args) == 3, "expected three arguments")
runtimex.Assert(args[2] == "--show-sdk-path", "the third argument must be --show-sdk-path")
return filepath.Join("Developer", "SDKs", args[1])
return string(filepath.Separator) + filepath.Join("Developer", "SDKs", args[1])

case "-find":
runtimex.Assert(len(args) == 4, "expected four arguments")
runtimex.Assert(args[1] == "-sdk", "the second argument must be -sdk")
return filepath.Join("Developer", "SDKs", args[2], "bin", args[3])
return string(filepath.Separator) + filepath.Join("", "Developer", "SDKs", args[2], "bin", args[3])
bassosimone marked this conversation as resolved.
Show resolved Hide resolved

default:
panic(errors.New("the first argument must be -sdk or -find"))
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/buildtool/ios.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ func iosNewCBuildEnv(deps buildtoolmodel.Dependencies, ooniArch string) *cBuildE
CFLAGS: []string{
"-isysroot", isysroot,
minVersionFlag + iosMinVersion, // tricky: they must be concatenated
"-O2",
"-arch", appleArch,
"-fembed-bitcode",
"-O2",
},
CONFIGURE_HOST: "", // later
DESTDIR: destdir,
Expand Down
Loading
Loading