(all_workloads, workloads)
| 119 | if os.path.isdir(os.path.join(workload_dir, subdir))] |
| 120 | |
| 121 | def validate_workloads(all_workloads, workloads): |
| 122 | for workload in workloads: |
| 123 | if workload not in all_workloads: |
| 124 | LOG.error('Workload \'%s\' not found in workload directory' % workload) |
| 125 | LOG.error('Available workloads: ' + ', '.join(all_workloads)) |
| 126 | sys.exit(1) |
| 127 | |
| 128 | def exec_cmd(cmd, error_msg=None, exit_on_error=True, out_file=None): |
| 129 | """Run the given command in the shell returning whether the command |