<p>I stumbled across the answer.  From within the profile directory, run this command:</p>

<pre><code>inspec exec .
</code></pre>

<p>Don't forget to set the <code>depends</code> key in <code>inspec.yml</code>.</p>

CC BY-SA 4.0
2018-07-03T11:04:05.977Z
2018-07-03T11:04:05.977Z
james.garriss
<p>This blog post describes wrapper profiles in detail:</p>

<p><a href="https://blog.chef.io/2017/07/06/understanding-inspec-profile-inheritance/" rel="nofollow noreferrer">https://blog.chef.io/2017/07/06/understanding-inspec-profile-inheritance/</a></p>

<p>At the very end of the post, it references a Git repo that contains an example of using a wrapper profile:</p>

<p><a href="https://github.com/adamleff/inspec-profile-wrapper-example" rel="nofollow noreferrer">https://github.com/adamleff/inspec-profile-wrapper-example</a></p>

<p>When I clone the repo, cd to the <code>controls</code> folder, and attempt to run these tests:</p>

<pre><code>inspec exec controls_from_other_profiles.rb
</code></pre>

<p>I get the following error message:</p>

<blockquote>
  <p>Cannot load linux-baseline since it is not listed as a dependency of
  tests from controls_from_other_profiles.rb.</p>
  
  <p>Dependencies available from this context are:</p>
</blockquote>

<p>The dependencies are defined in <code>inspec.yml</code>.</p>

<p>How do I correctly run these tests?</p>

CC BY-SA 4.0
2018-07-03T04:44:16.933Z
Don't try to run the control file but run the profile itself, there's pretty good material to learn inspec on https://learn.chef.io
Tensibai
<chef><inspec>
How do I run the InSpec using a wrapper profile?
james.garriss
# How do I run the InSpec using a wrapper profile?

(Asked by: username_0 on 2018-07-02)

This blog post describes wrapper profiles in detail:
https://blog.chef.io/2017/07/06/understanding-inspec-profile-inheritance/
At the very end of the post, it references a Git repo that contains an example of using a wrapper profile:
https://github.com/adamleff/inspec-profile-wrapper-example
When I clone the repo, cd to the controls folder, and attempt to run these tests:
inspec exec controls_from_other_profiles.rb

I get the following error message:

Cannot load linux-baseline since it is not listed as a dependency of
  tests from controls_from_other_profiles.rb.
Dependencies available from this context are:

The dependencies are defined in inspec.yml.
How do I correctly run these tests?

**Tags:** chef, inspec

> **Comments:**
> **username_1**: Don't try to run the control file but run the profile itself, there's pretty good material to learn inspec on https://learn.chef.io  

---

## 1 answers

### Answer by username_0 on 2018-07-03. Score: 2

I stumbled across the answer.  From within the profile directory, run this command:
inspec exec .

Don't forget to set the depends key in inspec.yml.


---

