Skip to content

Commit

Permalink
Fix userenv.json loading
Browse files Browse the repository at this point in the history
Userenv directory are in the for `./userenvs/<name>/userenv.json`

Change the loading path to avoid errors like:
```
Working on stream8 userenv
Sourcing container image for userenv 'stream8' and benchmark/tool 'iperf'; this may take a few minutes
ERROR: Could not load userenv JSON file for 'stream8' due to non-zero return code 8.  Are you sure this is a supported userenv?
Perl exited with active threads:
        0 running and unjoined
        1 finished and unjoined
        0 running and detached
Skipping run post-processing due to error(s) [rc=2]
```
  • Loading branch information
zeeke authored Aug 30, 2024
1 parent 91c332f commit 534166e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rickshaw-run
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,10 @@ sub source_container_image {
my @workshop_args;
my $userenv_arg;
my $count = 0;
(my $rc, my $userenv_ref) = get_json_file($rickshaw_project_dir . "/userenvs/" . $userenv . ".json");
my $userenv_file = $rickshaw_project_dir . "/userenvs/" . $userenv . "/userenv.json";
(my $rc, my $userenv_ref) = get_json_file($userenv_file);
if ($rc != 0) {
die "ERROR: Could not load userenv JSON file for '" . $userenv . "' due to non-zero return code " . $rc . ". Are you sure this is a supported userenv?\n";
die "ERROR: Could not load userenv JSON file for '" . $userenv_file . "' due to non-zero return code " . $rc . ". Are you sure this is a supported userenv?\n";
}
my $userenv_image = $$userenv_ref{'userenv'}{'origin'}{'image'} . ":" . $$userenv_ref{'userenv'}{'origin'}{'tag'};
while (scalar @requirements > 0) {
Expand Down

0 comments on commit 534166e

Please sign in to comment.