Skip to content

[FEATURE]: Ability to load specs in spack schema #1533

@shahzebsiddiqui

Description

@shahzebsiddiqui

Please describe your feature

We should add support for spack load this can be useful for running tests or simply loading the package once its installed. We should add the following. Let's say if we were to test m4 we can load the package prior to testing it. This could be done as follows

buildspecs:
  spack_load_example:
    type: spack
    executor: generic.local.bash
    description: "Run spack load for m4 package and run tests"
    tags: [spack]
    spack:
      root: $HOME/spack
      load:
        options: '--only package'
        specs: [m4]
      test:
        run:
          specs: ['m4']
        results:
          option: "-l"

In the above test, the load refers to spack load and options refer to options that can be passed to spack load command with a list of specs defined by specs property. The below command would translate to spack load --only package m4

      load:
        options: '--only package'
        specs: [m4]

The order of where spack load command must be written in test must be done after spack install (if present) and before spack test (if present).

TODO

Suggest potential solution

No response

Additional Information

No response

Post question in Slack

  • I agree that I posted my question in slack before creating this issue

Is there an existing issue

  • I confirm there is no existing issue for this issue

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions