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

tests: enable secure boot provisioning of cm4 #3444

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 12 additions & 0 deletions tests/suites/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ module.exports = [
}
},
image: `${__dirname}/balena-image.docker`,
// This is the name of a folder or file containing extra artifacts needed for the test suite
// E.g for the cm4-io-board provisioning the `secure-boot-msd` folder is required
// This artifact/artifact must be copied into the `suites` folder before running the test
artifacts: process.env.ARTIFACTS,
debug: {
// Exit the ongoing test suite if a test fails
failFast: true,
Expand Down Expand Up @@ -55,6 +59,10 @@ module.exports = [
// Mark unstable tests to be skipped
unstable: ['']
},
// This is the name of a folder or file containing extra artifacts needed for the test suite
// E.g for the cm4-io-board provisioning the `secure-boot-msd` folder is required
// This artifact/artifact must be copied into the `suites` folder before running the test
artifacts: process.env.ARTIFACTS,
workers: process.env.WORKER_TYPE === 'qemu' ? ['http://worker'] : {
balenaApplication: process.env.BALENACLOUD_APP_NAME.split(','),
apiKey: process.env.BALENACLOUD_API_KEY,
Expand All @@ -75,6 +83,10 @@ module.exports = [
}
},
image: `${__dirname}/balena.img.gz`,
// This is the name of a folder or file containing extra artifacts needed for the test suite
// E.g for the cm4-io-board provisioning the `secure-boot-msd` folder is required
// This artifact/artifact must be copied into the `suites` folder before running the test
artifacts: process.env.ARTIFACTS,
debug: {
// Exit the ongoing test suite if a test fails
failFast: true,
Expand Down
9 changes: 9 additions & 0 deletions tests/suites/os/suite.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,15 @@ module.exports = {
console.log("No migration requested")
}


if(this.suite.options.artifacts !== undefined){
// extra artifacts "artifacts" are defined in the config.js of the suite
// these artifacts must be in the "suites" directory in the config.js - so you must copy them into suites before
// running the tests if these are build time artifacts
console.log(`Sending extra artifact folder: ${this.suite.options.artifacts} to worker...`)
await this.worker.sendFile(`${__dirname}/${this.suite.options.artifacts}`,'/data/', 'worker');
}

if ( this.os.configJson.installer.secureboot ) {
console.log("Opting-in secure boot and full disk encryption")
} else {
Expand Down
Loading
Loading