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

utils: Add new design for generator script #44

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

razvand
Copy link

@razvand razvand commented Jun 20, 2024

Add new design for generator script

@razvand razvand added the enhancement New feature or request label Jun 20, 2024
'networking': i[8]
}

def _is_valid_config(d):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep an order about the if clauses?

For example - platform, then hypervisor, then netowrking and so on?

}
libs = []
targets = []
scripts_dir = os.path.join(os.getcwd(), "scripts")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
scripts_dir = os.path.join(os.getcwd(), "scripts")
scripts_dir = os.path.join(os.getcwd(), SCRIPTS_PATH)

I think it may be better if we want to change the path in the future?

import itertools

class ConfigVariants:
arch = ['arm64', 'x86_64']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
arch = ['arm64', 'x86_64']
arch = ['arm64', 'x86_64']

I think it would be better to have a dictionary here to keep track a number of options (an option means arch, hypervisor, platform etc)

networking = ['none', 'bridge', 'nat', 'tap']

def _convert_to_dict(i):
return {
Copy link

@RaduNichita RaduNichita Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return {
return {

could you add an assert for the number of options, to make sure we get an error when we add a new option and we don't modify in all places

Signed-off-by: Razvan Deaconescu <[email protected]>
Signed-off-by: Razvan Deaconescu <[email protected]>
Signed-off-by: Razvan Deaconescu <[email protected]>
Signed-off-by: Razvan Deaconescu <[email protected]>
Signed-off-by: Razvan Deaconescu <[email protected]>
Until this point a variant consisted of a combination of build and run
parameters. However, this was redundant as the the build parameters (and
build) were part of multiple variants.

Separate build parameters from run parameters in `tester.yaml`. A
variant consists of a build variant (set of parameters) and multiple run
variants (an array of sets of parameters).

Signed-off-by: Razvan Deaconescu <[email protected]>
Update templates for build commands to use Clang or GCC.

Signed-off-by: Razvan Deaconescu <[email protected]>
Signed-off-by: Razvan Deaconescu <[email protected]>
Use the same name networking in the tester configuration file and in the
template script names: "bridge", "nat", "tap".

Signed-off-by: Razvan Deaconescu <[email protected]>
Add Firecracker template scripts and support in generating run scripts
and configuration files (JSON).

Signed-off-by: Razvan Deaconescu <[email protected]>
Add directory with common support scripts. Add `common.sh` script used
for running tests.

Signed-off-by: Razvan Deaconescu <[email protected]>
Add `xen` to Kraftfile.
Add `config.yaml` with testing configurations.
Add `.test` basic test script.

Signed-off-by: Razvan Deaconescu <[email protected]>
Signed-off-by: Razvan Deaconescu <[email protected]>
`.tests/` is the working directory for testing.

Signed-off-by: Razvan Deaconescu <[email protected]>
Signed-off-by: Razvan Deaconescu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants