diff --git a/ruby/test.rb b/ruby/test.rb index 7785090..6cfa879 100755 --- a/ruby/test.rb +++ b/ruby/test.rb @@ -135,6 +135,7 @@ def waitForAllTestCompletion @testCompleted = 0 @oscReceiver.add_method('/test/all/complete', '') do |msg| + puts " all tests completed" @testCompleted = 1 end @@ -158,6 +159,20 @@ def launchMax else IO.popen("#{@maxfolder}/Max.exe") end + + @oscReceiver.add_method('/db/log', 's') do |msg| + puts " #{msg.args[0]}" + + # on the mac things can stall out if Max is not made the front-most application + if RUBY_PLATFORM.match(/darwin/) + if @maxfolder.match(/\.app\/*$/) # check if app name given directly + `open "#{@maxfolder}"` + else # nope, just a folder name, so assume Max.app + `open "#{@maxfolder}/Max.app"` + end + end + + end end diff --git a/source/oscar/test.db.c b/source/oscar/test.db.c index 039b191..450ccbb 100755 --- a/source/oscar/test.db.c +++ b/source/oscar/test.db.c @@ -135,9 +135,16 @@ void testdb_log(t_testdb *d, long test_id, const char* text, ...) t_datetime datetime; va_list ap; char expandedtext[2048]; - + va_start(ap, text); vsnprintf(expandedtext, 2048, text, ap); + + { + t_atom a; + atom_setsym(&a, gensym(expandedtext)); + testport_send((t_testport*)ps_testport->s_thing, gensym("/db/log"), 1, &a); + } + systime_secondstodate(timestamp, &datetime); db_query(d->d_db, NULL, "INSERT INTO logs ( test_id_ext , text , timestamp ) \ VALUES ( %i , \"%s\" , '%4u-%02u-%02u %02u:%02u:%02u' )",