Skip to content

Commit

Permalink
Try fixing the integration test "Output was: Error opening terminal: …
Browse files Browse the repository at this point in the history
…unknown."
  • Loading branch information
mvidner committed Nov 2, 2020
1 parent 8ce9a23 commit 2b8d6e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tests/integration/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def cleanup
test = File.dirname(__FILE__) + "/std_streams_spec.rb"
cmd = "rspec #{test} >#{OUTPUT} 2>&1"

`tmux -c '#{cmd}; echo \$? > #{RESULT}'`
tmux_out = `tmux -c '#{cmd}; echo \$? > #{RESULT}'`
puts "Tmux output:"
puts tmux_out
if File.exist?(RESULT) && File.read(RESULT) == "0\n"
puts "Test succeeded."
cleanup
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/std_streams_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
require_relative "../test_helper"
require "yast/ui_shortcuts"

Yast.import "UI"

def std_puts(message)
$stdout.puts "stdout: #{message}"
$stderr.puts "stderr: #{message}"
end

std_puts "tty before importing UI"
std_puts "TERM=#{ENV['TERM']}"
Yast.import "UI"

# Regression test for the fix of bnc#943757 implemented
# in libyui-ncurses 2.47.3
describe "streams redirection in libyui-ncurses" do
Expand Down

0 comments on commit 2b8d6e7

Please sign in to comment.