File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -272,9 +272,12 @@ def csrs
272272 gen_path_override : Pathname . new ( options [ :gen ] )
273273 )
274274 cfg_arch = resolver . cfg_arch_for ( cfg_file . realpath )
275+ count = 0
275276 cfg_arch . csrs . each do |csr |
276277 puts csr . name
278+ count += 1
277279 end
280+ count
278281 end
279282 end
280283 end
Original file line number Diff line number Diff line change @@ -65,13 +65,12 @@ def test_disasm
6565 end
6666
6767 def test_list_csrs
68- out , err = capture_io do
69- run_cmd ( "list csrs" )
70- end
71- assert_empty err
68+ num_listed = run_cmd ( "list csrs" )
69+
7270 repo_top = Udb . repo_root
7371 num_csr_yaml_files = `find #{ repo_top } /spec/std/isa/csr/ -name '*.yaml' | wc -l` . to_i
74- assert_equal num_csr_yaml_files , out . split . length
72+
73+ assert_equal num_csr_yaml_files , num_listed
7574 end
7675
7776end
You can’t perform that action at this time.
0 commit comments