test 449: only test for success, not for content

Some of the sub-tests in 449 have to work with uninitialized data due to
the file structure errors in the source files. Therefore the data's
content may actually change from run to run. Such a change was triggered
with change f82360d. Therefore only test whether or not muxing succeeds
for those sub-tests, not what the actual content looks like.
This commit is contained in:
Moritz Bunkus 2016-04-09 18:08:02 +02:00
parent 8c353a266f
commit db45155c02
3 changed files with 21 additions and 9 deletions

View File

@ -294,7 +294,7 @@ T_445teletext_subs_missing_second_line:ffbf578cd2806634b76d8e4322600c56:passed:2
T_446mkvinfo_output:d79a79c6c267d83604fb5dedfb361220-05d21f5e324d5b02a5f4bc1a44c58e13-a1a990a98a530744fe2f18d2dedcb116-bea802377f7e6f09efdb90a2e0ed11c9:passed:20141216-165433:2.799686224
T_447mkvinfo_rounded_timecodes:1af5a15e4e84818e9f85221fbc621b00-2a3771b863ced8cf1c624a5df5eafadb-7a77f3e6264e1881e42980bbc85a9e1a:passed:20141216-172642:1.712081143
T_448mpeg_ts_with_hevc:6733a551eacab4145ed267bea8a4d75c:passed:20141216-181650:1.133097273
T_449segfaults_assertions:error-error-06096bf8b416ae2c869f6bc32e88213a-e5484c528a96c5f3fd678ea6bd99a8f2-d0c5f7db319baa4adbd3b965f2c505d5-d560ddb71dfdc430be462588ec38e789-error-error-91eca98ea8df1f307644d5d17d8f0f95-36602f6d1d981cd429f54a6a39b023d8-91eca98ea8df1f307644d5d17d8f0f95-e5484c528a96c5f3fd678ea6bd99a8f2-e5484c528a96c5f3fd678ea6bd99a8f2-f89d13bdea53445e67c78c042f7f783e-565d2ce6866560056a2e929279f88e8e-f89d13bdea53445e67c78c042f7f783e:passed:20141219-195127:0.830949441
T_449segfaults_assertions:error-error-ok-e5484c528a96c5f3fd678ea6bd99a8f2-d0c5f7db319baa4adbd3b965f2c505d5-d560ddb71dfdc430be462588ec38e789-error-error-ok-36602f6d1d981cd429f54a6a39b023d8-91eca98ea8df1f307644d5d17d8f0f95-e5484c528a96c5f3fd678ea6bd99a8f2-e5484c528a96c5f3fd678ea6bd99a8f2-f89d13bdea53445e67c78c042f7f783e-565d2ce6866560056a2e929279f88e8e-f89d13bdea53445e67c78c042f7f783e:passed:20141219-195127:0.830949441
T_450aac_loas_latm_in_mpeg_ts:2e174e28aecb0f318fbfd8e9647dbd3c:passed:20141229-210738:0.515183095
T_451aac_loas_latm_raw:5a2db12f6eea0bcd37a5d524d8c4c91c:passed:20141230-155351:0.589778873
T_452mkvinfo_track_statistics_frame_order:cb9a860b00fd306fe85e2ac3ee698c17-d49ee464e7ea3eefbbc3e3b4707a308a:passed:20141230-182428:1.579605124

View File

@ -7,7 +7,7 @@ dir = "data/segfaults-assertions"
test_merge "#{dir}/1089-1.mkv", :exit_code => :error
test_merge "#{dir}/1089-2.mkv", :exit_code => :error
test_merge "#{dir}/1089-3.mkv"
test_merge "#{dir}/1089-3.mkv", :result_type => :exit_code
test_info "#{dir}/1089-1.mkv", :args => "-v -v", :exit_code => :error
test "1089-2.mkv" do
@ -18,7 +18,7 @@ test_info "#{dir}/1089-3.mkv", :args => "-v -v"
test_merge "#{dir}/1096-id:000000,sig:06,src:000000,op:flip1,pos:0.mkv", :exit_code => :error
test_merge "#{dir}/1096-id:000001,sig:06,src:000000,op:flip1,pos:0.mkv", :exit_code => :error
test_merge "#{dir}/1096-id:000002,sig:06,src:000000,op:flip2,pos:582.mkv"
test_merge "#{dir}/1096-id:000002,sig:06,src:000000,op:flip2,pos:582.mkv", :result_type => :exit_code
test_merge "#{dir}/1096-id:000003,sig:06,src:000000,op:flip2,pos:606.mkv"
test_merge "#{dir}/1096-id:000004,sig:06,src:000000,op:flip4,pos:582.mkv"

View File

@ -105,19 +105,31 @@ class SimpleTest
@blocks[:tests] << { :name => name, :block => block }
end
def exit_code_string exit_code
return exit_code == 0 ? 'ok' \
: exit_code == 1 ? 'warning' \
: exit_code == 2 ? 'error' \
: "unknown(#{exit_code})"
end
def test_merge file, *args
options = args.extract_options!
full_command_line = [ options[:args], file ].flatten.join(' ')
options[:name] ||= full_command_line
options[:result_type] ||= :hash
@blocks[:tests] << {
:name => full_command_line,
:block => lambda {
output = options[:output] || tmp
merge full_command_line, :exit_code => options[:exit_code], :output => output
result = options[:exit_code] == :error ? 'error' : hash_file(output)
_, exit_code = *merge(full_command_line, :exit_code => options[:exit_code], :output => output)
result = options[:exit_code] == :error ? 'error' \
: options[:result_type] == :hash ? hash_file(output) \
: exit_code_string(exit_code)
clean_tmp unless options[:keep_tmp]
puts "file #{file} xc #{exit_code} res #{result}"
result
},
}