When edd7b37ea added `--output-directory` to the invocation of osbuild,
it also removed `--store`.
This was a mistake: osbuild's default store is `.osbuild`, which is not
what we want. Restore the old behavior of passing a temporary directory,
but use the same for each test run.
35 lines
845 B
Go
35 lines
845 B
Go
// +build travis
|
|
|
|
package constants
|
|
|
|
import "os/exec"
|
|
|
|
func GetOsbuildCommand(store, outputDirectory string) *exec.Cmd {
|
|
cmd := exec.Command(
|
|
"python3",
|
|
"-m", "osbuild",
|
|
"--libdir", ".",
|
|
"--store", store,
|
|
"--output-directory", outputDirectory,
|
|
"--json",
|
|
"-",
|
|
)
|
|
cmd.Dir = "osbuild"
|
|
return cmd
|
|
}
|
|
|
|
var TestPaths = struct {
|
|
ImageInfo string
|
|
PrivateKey string
|
|
TestCasesDirectory string
|
|
UserData string
|
|
MetaData string
|
|
AzureDeploymentTemplate string
|
|
}{
|
|
ImageInfo: "tools/image-info",
|
|
PrivateKey: "test/keyring/id_rsa",
|
|
TestCasesDirectory: "test/cases",
|
|
UserData: "test/cloud-init/user-data",
|
|
MetaData: "test/cloud-init/meta-data",
|
|
AzureDeploymentTemplate: "test/azure-deployment-template.json",
|
|
}
|