about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-01-19 09:17:51 +0000
committerEric Wong <e@80x24.org>2015-01-19 09:58:47 +0000
commitef39866fa6e6ac91cc64f18573dea22c3f75c6e1 (patch)
tree62ab8b9cfdf57acf63b84661f7ed8fa1725b9fc8 /test
parentb95a51440b6378847c4ab5dd4cf9e96e18b5f241 (diff)
downloaddtas-ef39866fa6e6ac91cc64f18573dea22c3f75c6e1.tar.gz
Ensure we can apply the workaround to dtas-sourceedit and our
test cases while also simplifying the existing call sites a
little.  This will also make for less code churn in 3-5
years down the line when we drop <= 2.1 support.
Diffstat (limited to 'test')
-rw-r--r--test/test_player_integration.rb3
-rw-r--r--test/test_splitfx.rb5
2 files changed, 5 insertions, 3 deletions
diff --git a/test/test_player_integration.rb b/test/test_player_integration.rb
index 2525ac5..033e313 100644
--- a/test/test_player_integration.rb
+++ b/test/test_player_integration.rb
@@ -3,11 +3,12 @@
 require './test/player_integration'
 class TestPlayerIntegration < Testcase
   include PlayerIntegration
+  include DTAS::SpawnFix
 
   def test_cmd_rate
     env = ENV.to_hash.merge(@fmt.to_env)
     cmd = "sox -n $SOXFMT - synth 3 pinknoise | #@cmd"
-    pid = Process.spawn(env, cmd)
+    pid = spawn(env, cmd)
     t = Time.now
     _, _ = Process.waitpid2(pid)
     elapsed = Time.now - t
diff --git a/test/test_splitfx.rb b/test/test_splitfx.rb
index ea170ce..5fbc0ac 100644
--- a/test/test_splitfx.rb
+++ b/test/test_splitfx.rb
@@ -6,6 +6,7 @@ require 'thread'
 require_relative 'helper'
 
 class TestSplitfx < Testcase
+  include DTAS::SpawnFix
 
   def tmp_err(path)
     err = $stderr.dup
@@ -56,9 +57,9 @@ class TestSplitfx < Testcase
 
         # compare results with expected output
         res_cmd = "sox 1.flac 2.flac -ts32 -c2 -r44100 result.s32 stats"
-        res_pid = Process.spawn(res_cmd, err: 'b.txt')
+        res_pid = spawn(res_cmd, err: 'b.txt')
         exp_cmd = "sox foo.flac -ts32 -c2 -r44100 expect.s32 trim 4 stats"
-        exp_pid = Process.spawn(exp_cmd, err: 'a.txt')
+        exp_pid = spawn(exp_cmd, err: 'a.txt')
         _, s = Process.waitpid2(res_pid)
         assert s.success?, "#{res_cmd}: #{s.inspect}"
         _, s = Process.waitpid2(exp_pid)