@@ -55,20 +55,22 @@ namespace :serve do
5555 end
5656end
5757
58- desc "Run the IDL compiler test suite"
59- task :idl_test do
60- t = Minitest ::TestTask . new ( :lib_test )
61- t . test_globs = [ "#{ $root} /lib/idl/tests/test_*.rb" ]
62- t . process_env
63- ruby t . make_test_cmd
64- end
58+ namespace :test do
59+ # "Run the IDL compiler test suite"
60+ task :idl_compiler do
61+ t = Minitest ::TestTask . new ( :lib_test )
62+ t . test_globs = [ "#{ $root} /lib/idl/tests/test_*.rb" ]
63+ t . process_env
64+ ruby t . make_test_cmd
65+ end
6566
66- desc "Run the Ruby library test suite"
67- task :lib_test do
68- t = Minitest ::TestTask . new ( :lib_test )
69- t . test_globs = [ "#{ $root} /lib/test/test_*.rb" ]
70- t . process_env
71- ruby t . make_test_cmd
67+ # "Run the Ruby library test suite"
68+ task :lib do
69+ t = Minitest ::TestTask . new ( :lib_test )
70+ t . test_globs = [ "#{ $root} /lib/test/test_*.rb" ]
71+ t . process_env
72+ ruby t . make_test_cmd
73+ end
7274end
7375
7476desc "Clean up all generated files"
@@ -77,7 +79,7 @@ task :clean do
7779 FileUtils . rm_rf $root / ".stamps"
7880end
7981
80- namespace :validate do
82+ namespace :test do
8183 task :insts do
8284 puts "Checking instruction encodings..."
8385 inst_paths = Dir . glob ( "#{ $root} /arch/inst/**/*.yaml" ) . map { |f | Pathname . new ( f ) }
@@ -95,9 +97,10 @@ namespace :validate do
9597 progressbar . increment
9698 validator . validate ( f )
9799 end
100+ Rake ::Task [ "test:insts" ] . invoke
98101 puts "All files validate against their schema"
99102 end
100- task idl : [ "gen:arch" , "#{ $root} /.stamps/arch-gen-_32.stamp" , "#{ $root} /.stamps/arch-gen-_64.stamp" ] do
103+ task idl_model : [ "gen:arch" , "#{ $root} /.stamps/arch-gen-_32.stamp" , "#{ $root} /.stamps/arch-gen-_64.stamp" ] do
101104 print "Parsing IDL code for RV32..."
102105 arch_def_32 = arch_def_for ( "_32" )
103106 puts "done"
@@ -114,9 +117,6 @@ namespace :validate do
114117 end
115118end
116119
117- desc "Validate the arch docs"
118- task validate : [ "validate:schema" , "validate:idl" , "validate:insts" ]
119-
120120def insert_warning ( str , from )
121121 # insert a warning on the second line
122122 lines = str . lines
@@ -274,67 +274,97 @@ namespace :gen do
274274 end
275275end
276276
277- desc <<~DESC
278- Run the regression tests
279-
280- These tests must pass before a commit will be allowed in the main branch on GitHub
281- DESC
282- task :regress do
283- Rake ::Task [ "idl_test" ] . invoke
284- Rake ::Task [ "lib_test" ] . invoke
285- Rake ::Task [ "validate" ] . invoke
286- ENV [ "MANUAL_NAME" ] = "isa"
287- ENV [ "VERSIONS" ] = "all"
288- Rake ::Task [ "gen:html_manual" ] . invoke
289- Rake ::Task [ "gen:html" ] . invoke ( "generic_rv64" )
290- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
291- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
292- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
293- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
294- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
295- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
296-
297- puts
298- puts "Regression test PASSED"
277+ namespace :test do
278+ desc <<~DESC
279+ Run smoke tests
280+
281+ These are basic but fast-running tests to check the database and tools
282+ DESC
283+ task :smoke do
284+ Rake ::Task [ "test:idl_compiler" ] . invoke
285+ Rake ::Task [ "test:lib" ] . invoke
286+ Rake ::Task [ "test:schema" ] . invoke
287+ Rake ::Task [ "test:idl_model" ] . invoke
288+ end
289+
290+ desc <<~DESC
291+ Run the regression tests
292+
293+ These tests must pass before a commit will be allowed in the main branch on GitHub
294+ DESC
295+ task :regress do
296+ Rake ::Task [ "test:smoke" ] . invoke
297+
298+ ENV [ "MANUAL_NAME" ] = "isa"
299+ ENV [ "VERSIONS" ] = "all"
300+ Rake ::Task [ "gen:html_manual" ] . invoke
301+
302+ Rake ::Task [ "gen:html" ] . invoke ( "generic_rv64" )
303+
304+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
305+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
306+
307+ puts
308+ puts "Regression test PASSED"
309+ end
310+
311+ desc <<~DESC
312+ Run the nightly regression tests
313+
314+ Generally, this tries to build all artifacts
315+ DESC
316+ task :nightly do
317+ Rake ::Task [ "regress" ] . invoke
318+
319+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
320+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
321+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
322+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
323+
324+ puts
325+ puts "Nightly regression test PASSED"
326+ end
299327end
300328
301- desc <<~DESC
302- Generate all certificates and profile PDFs.
303- DESC
304- task :cert_profile_pdfs do
305- puts "==================================="
306- puts "cert_profile_pdfs: Generating MC100"
307- puts " 1st target"
308- puts "==================================="
309- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
310-
311- puts "=================================================="
312- puts "cert_profile_pdfs: Generating MockCertificateModel"
313- puts " 2nd target"
314- puts "=================================================="
315- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
316-
317- puts "==================================="
318- puts "cert_profile_pdfs: Generating RVA20"
319- puts " 3rd target"
320- puts "==================================="
321- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
322-
323- puts "==================================="
324- puts "cert_profile_pdfs: Generating RVA22"
325- puts " 4th target"
326- puts "==================================="
327- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
328-
329- puts "==================================="
330- puts "cert_profile_pdfs: Generating RVI20"
331- puts " 5th target"
332- puts "==================================="
333- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
334-
335- puts "==================================="
336- puts "cert_profile_pdfs: Generating MockProfileRelease"
337- puts " 6th target"
338- puts "==================================="
339- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
329+ namespace :gen do
330+ desc <<~DESC
331+ Generate all certificates and profile PDFs.
332+ DESC
333+ task :cert_profile_pdfs do
334+ puts "==================================="
335+ puts "cert_profile_pdfs: Generating MC100"
336+ puts " 1st target"
337+ puts "==================================="
338+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
339+
340+ puts "=================================================="
341+ puts "cert_profile_pdfs: Generating MockCertificateModel"
342+ puts " 2nd target"
343+ puts "=================================================="
344+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
345+
346+ puts "==================================="
347+ puts "cert_profile_pdfs: Generating RVA20"
348+ puts " 3rd target"
349+ puts "==================================="
350+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
351+
352+ puts "==================================="
353+ puts "cert_profile_pdfs: Generating RVA22"
354+ puts " 4th target"
355+ puts "==================================="
356+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
357+
358+ puts "==================================="
359+ puts "cert_profile_pdfs: Generating RVI20"
360+ puts " 5th target"
361+ puts "==================================="
362+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
363+
364+ puts "==================================="
365+ puts "cert_profile_pdfs: Generating MockProfileRelease"
366+ puts " 6th target"
367+ puts "==================================="
368+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
369+ end
340370end
0 commit comments