-
Notifications
You must be signed in to change notification settings - Fork 1
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
Update generator to work on bincompat apps. #42
base: main
Are you sure you want to change the base?
Update generator to work on bincompat apps. #42
Conversation
The script generates other scripts that setup, configure, build and run native applications. The input of the script is the `Kraftfile` of the application and the `config.yaml` file that specifies configuration such as memory, path to filesystem (if any), requirements for networking. Also add the test support files (`test/common.sh` and `test/test.sh`) used for testing. The application will define a `single_test.sh` script. Signed-off-by: Razvan Deaconescu <[email protected]>
Add specific files to scripted actions. Add `config.yaml` and `single_test.sh`. The `config.yaml` file is used doring the setup, build and run phases to generate the directory structure and scripts. The `single_test.sh` script is used as the basic script. It is called for each build and run phase by the generated `script/test/test.sh` script. Signed-off-by: Razvan Deaconescu <[email protected]>
Add instructions in README for testing applications using generated scripts. Signed-off-by: Razvan Deaconescu <[email protected]>
Build root filesystem from Dockerfile, if specified in the Kraftfile. Signed-off-by: Razvan Deaconescu <[email protected]>
Templated apps make use of a separate application repository. The only current example is `app-elfloader`. Signed-off-by: Razvan Deaconescu <[email protected]>
Force the use of the BuildKit container when using `kraft build` by prefixing the build commands with `KRAFTKIT_BUILDKIT_HOST=docker-container://buildkitd`. Signed-off-by: Razvan Deaconescu <[email protected]>
Add specific files to scripted actions. Add `config.yaml` and `single_test.sh`. The `config.yaml` file is used doring the setup, build and run phases to generate the directory structure and scripts. The `single_test.sh` script is used as the basic script. It is called for each build and run phase by the generated `script/test/test.sh` script. Signed-off-by: Razvan Deaconescu <[email protected]>
Add 9pfs configuration settings. Signed-off-by: Razvan Deaconescu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comments
"""Generate shell script to set up repositories.""" | ||
|
||
if config["libs"]: | ||
if config["template"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will thow KeyError: 'template'
if no template is used. I think the check should be something like if "template" in config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right. I will fix.
@@ -0,0 +1,2 @@ | |||
networking: True | |||
memory: 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't 8mb of memory way too less?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Test it and you'll see. The beauty of native apps.
return "$found" | ||
} | ||
|
||
out_dir="scripts/test/$(date +"%Y-%m-%d-%H:%M:%S")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to granular, you will very likely have a different directory for every test that is done during the testing phase (e.g. one directory for qemu-x86_64-einitrd
, one for fc-x86_64-einitrd
, etc.
I would stop at the hour mark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't work. You actually make multiple runs during an hour, while testing. And yes, the goal is for every test to have its own directory, you want to capture them all, right?
This translates to adding support for
Dockerfile
-based root filesystem and for templated applications (i.e. thebase
library entry).This pull request is based on PR #40