Skip to content

Commit

Permalink
Revert "bin/run-local: introduce --dry-run option"
Browse files Browse the repository at this point in the history
This reverts commit 0feb156.
  • Loading branch information
rli9 committed Oct 23, 2019
1 parent f3fb348 commit a6d6db6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions bin/run-local
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ ENV['BENCHMARK_ROOT'] = '/lkp/benchmarks'

$opt_result_root = 'result'
$opt_set_key_value = {}
$dryrun = false

opt_parser = OptionParser.new do |opts|
opts.banner = 'Usage: run-local [-o RESULT_ROOT] JOBFILE'
Expand All @@ -44,13 +43,6 @@ opt_parser = OptionParser.new do |opts|
$opt_set_key_value.merge!(YAML.load(key_value))
end

opts.on('-s', '--dry-run', 'Perform a simulation of events') do
alias system puts_stdout # only output system commands to stdout
alias puts puts_stderr # redirect logs to stderr to leave stdout to commands
$dryrun = true
$dryrun = true
end

opts.on_tail('-h', '--help', 'Show this message') do
puts opts
exit
Expand Down Expand Up @@ -142,7 +134,6 @@ FileUtils.rm_rf TMP
Dir.mkdir TMP

job_script = result_root + '/job.sh'
puts "job_script: #{job_script}"
File.open(job_script, 'w', 0o775) do |file|
file.puts jobx.to_shell
end
Expand All @@ -159,8 +150,6 @@ job.save result_root + '/job.yaml'

system job_script, 'extract_stats'

exit if $dryrun

stats = create_stats_matrix ENV['RESULT_ROOT']
stats['stats_source'] = result_root + '/stats.json'
unite_to(stats, _result_root)
Expand Down

0 comments on commit a6d6db6

Please sign in to comment.