~tim/scheme-vm

e071223a5e76da50309c0715c3d5f5a7697e625b — Tim Morgan 4 years ago c34a8e1
Update watchr config to compile rust
1 files changed, 6 insertions(+), 0 deletions(-)

M .watchr
M .watchr => .watchr +6 -0
@@ 10,6 10,11 @@ def run_tests(files, scm_file = nil)
  print cmd.getc until cmd.eof?
end

def compile
  cmd = IO.popen('cargo build --release')
  print cmd.getc until cmd.eof?
end

watch('^spec/.*_spec\.rb')  { |m| run_tests(m.to_s) }
watch('^spec/.*-spec\.scm') { |m| run_tests('spec/lib_spec.rb', m.to_s) }
watch('^lib')               { |m| run_tests('spec/lib_spec.rb') }


@@ 17,5 22,6 @@ watch('^vm.*')              { |m| run_tests('spec/vm_spec.rb spec/vm/*') }
watch('^compiler.*')        { |m| run_tests('spec/compiler_spec.rb spec/compiler/*') }
watch('^program.*')         { |m| run_tests('spec/program_spec.rb spec/program/*') }
watch('^parser.*')          { |m| run_tests('spec/parser_spec.rb') }
watch('^src/.*')            { compile }

Signal.trap('QUIT') { run_tests('spec') } # Ctrl-\