From 81d84a4e268576ee797fa03dd0d63eafce48415a Mon Sep 17 00:00:00 2001 From: Brian Beyer Date: Wed, 25 Apr 2018 11:05:34 -0600 Subject: [PATCH] make t1123 the example standard --- atomics/t1123/t1123.yaml | 19 +++++++++++++------ atomics/t1130/t1130.yaml | 8 ++++++-- bin/generate-docs | 8 ++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100755 bin/generate-docs diff --git a/atomics/t1123/t1123.yaml b/atomics/t1123/t1123.yaml index 4ca8648c..67b8b245 100644 --- a/atomics/t1123/t1123.yaml +++ b/atomics/t1123/t1123.yaml @@ -6,19 +6,26 @@ atomic_tests: - name: SourceRecorder via cmd.exe description: | Create a file called test.wma, with the duration of 30 seconds + supported_platforms: - windows - executor: command_prompt + args: - - output_file: test.wma - - duration_hms: 0000:00:30 - command: cmd.exe /c "SoundRecorder /FILE #{output_file} /DURATION #{duration_hms}" + output_file: + default: test.wma + duration_hms: + default: 0000:00:30 + + executors: + - name: command_prompt + command: SoundRecorder /FILE #{output_file} /DURATION #{duration_hms} - name: PowerShell Cmdlet description: | [AudioDeviceCmdlets](https://github.com/cdhunt/WindowsAudioDevice-Powershell-Cmdlet) supported_platforms: - windows - executor: powershell args: - command: powershell.exe xxxxx + executors: + - name: command_prompt + command: powershell.exe -Command WindowsAudioDevice-Powershell-Cmdlet diff --git a/atomics/t1130/t1130.yaml b/atomics/t1130/t1130.yaml index fbbfdeea..cda12144 100644 --- a/atomics/t1130/t1130.yaml +++ b/atomics/t1130/t1130.yaml @@ -10,8 +10,12 @@ atomic_tests: - linux executor: sh args: - - key_filename: rootCA.key - - cert_filename: rootCA.crt + key_filename: + type: filename + default: rootCA.key + cert_filename: + type: filename + default: rootCA.crt command: | openssl genrsa -out #{key_filename} 4096 openssl req -x509 -new -nodes -key #{key_filename} -sha256 -days 365 -out #{cert_filename} diff --git a/bin/generate-docs b/bin/generate-docs new file mode 100755 index 00000000..d50aa3ae --- /dev/null +++ b/bin/generate-docs @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby +require 'ostruct' +require 'yaml' + +Dir["#{File.dirname __FILE__}/../atomics/**/t*.yaml"].each do |technique_file| + technique = OpenStruct.new YAML.load(File.read(technique_file)) + p technique.display_name +end