@@ -83,20 +83,22 @@ namespace :serve do
8383 end
8484end
8585
86- desc "Run the IDL compiler test suite"
87- task :idl_test do
88- t = Minitest ::TestTask . new ( :lib_test )
89- t . test_globs = [ "#{ $root} /lib/idl/tests/test_*.rb" ]
90- t . process_env
91- ruby t . make_test_cmd
92- end
86+ namespace :test do
87+ # "Run the IDL compiler test suite"
88+ task :idl_compiler do
89+ t = Minitest ::TestTask . new ( :lib_test )
90+ t . test_globs = [ "#{ $root} /lib/idl/tests/test_*.rb" ]
91+ t . process_env
92+ ruby t . make_test_cmd
93+ end
9394
94- desc "Run the Ruby library test suite"
95- task :lib_test do
96- t = Minitest ::TestTask . new ( :lib_test )
97- t . test_globs = [ "#{ $root} /lib/test/test_*.rb" ]
98- t . process_env
99- ruby t . make_test_cmd
95+ # "Run the Ruby library test suite"
96+ task :lib do
97+ t = Minitest ::TestTask . new ( :lib_test )
98+ t . test_globs = [ "#{ $root} /lib/test/test_*.rb" ]
99+ t . process_env
100+ ruby t . make_test_cmd
101+ end
100102end
101103
102104desc "Clean up all generated files"
@@ -105,7 +107,7 @@ task :clean do
105107 FileUtils . rm_rf $root / ".stamps"
106108end
107109
108- namespace :validate do
110+ namespace :test do
109111 task :insts do
110112 puts "Checking instruction encodings..."
111113 inst_paths = Dir . glob ( "#{ $root} /arch/inst/**/*.yaml" ) . map { |f | Pathname . new ( f ) }
@@ -136,9 +138,6 @@ namespace :validate do
136138 end
137139end
138140
139- desc "Validate the arch docs"
140- task validate : [ "validate:schema" , "validate:idl" , "validate:insts" ]
141-
142141def insert_warning ( str , from )
143142 # insert a warning on the second line
144143 lines = str . lines
@@ -284,70 +283,101 @@ namespace :gen do
284283 end
285284end
286285
287- desc <<~DESC
288- Run the regression tests
289-
290- These tests must pass before a commit will be allowed in the main branch on GitHub
291- DESC
292- task :regress do
293- Rake ::Task [ "idl_test" ] . invoke
294- Rake ::Task [ "lib_test" ] . invoke
295- Rake ::Task [ "validate" ] . invoke
296- ENV [ "MANUAL_NAME" ] = "isa"
297- ENV [ "VERSIONS" ] = "all"
298- Rake ::Task [ "gen:html_manual" ] . invoke
299- Rake ::Task [ "gen:html" ] . invoke ( "generic_rv64" )
300- ENV [ "EXT" ] = "B"
301- ENV [ "VERSION" ] = "latest"
302- Rake ::Task [ "gen:ext_pdf" ] . invoke
303- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
304- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
305- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
306- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
307- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
308- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
309-
310- puts
311- puts "Regression test PASSED"
286+ namespace :test do
287+ desc <<~DESC
288+ Run smoke tests
289+
290+ These are basic but fast-running tests to check the database and tools
291+ DESC
292+ task :smoke do
293+ Rake ::Task [ "test:idl_compiler" ] . invoke
294+ Rake ::Task [ "test:lib" ] . invoke
295+ Rake ::Task [ "test:schema" ] . invoke
296+ Rake ::Task [ "test:idl_model" ] . invoke
297+ end
298+
299+ desc <<~DESC
300+ Run the regression tests
301+
302+ These tests must pass before a commit will be allowed in the main branch on GitHub
303+ DESC
304+ task :regress do
305+ Rake ::Task [ "test:smoke" ] . invoke
306+
307+ ENV [ "MANUAL_NAME" ] = "isa"
308+ ENV [ "VERSIONS" ] = "all"
309+ Rake ::Task [ "gen:html_manual" ] . invoke
310+
311+ ENV [ "EXT" ] = "B"
312+ ENV [ "VERSION" ] = "latest"
313+ Rake ::Task [ "gen:ext_pdf" ] . invoke
314+
315+ Rake ::Task [ "gen:html" ] . invoke ( "generic_rv64" )
316+
317+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
318+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
319+
320+ puts
321+ puts "Regression test PASSED"
322+ end
323+
324+ desc <<~DESC
325+ Run the nightly regression tests
326+
327+ Generally, this tries to build all artifacts
328+ DESC
329+ task :nightly do
330+ Rake ::Task [ "regress" ] . invoke
331+
332+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
333+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
334+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
335+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
336+
337+ puts
338+ puts "Nightly regression test PASSED"
339+ end
312340end
313341
314- desc <<~DESC
315- Generate all certificates and profile PDFs.
316- DESC
317- task :cert_profile_pdfs do
318- puts "==================================="
319- puts "cert_profile_pdfs: Generating MC100"
320- puts " 1st target"
321- puts "==================================="
322- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
323-
324- puts "=================================================="
325- puts "cert_profile_pdfs: Generating MockCertificateModel"
326- puts " 2nd target"
327- puts "=================================================="
328- Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
329-
330- puts "==================================="
331- puts "cert_profile_pdfs: Generating RVA20"
332- puts " 3rd target"
333- puts "==================================="
334- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
335-
336- puts "==================================="
337- puts "cert_profile_pdfs: Generating RVA22"
338- puts " 4th target"
339- puts "==================================="
340- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
341-
342- puts "==================================="
343- puts "cert_profile_pdfs: Generating RVI20"
344- puts " 5th target"
345- puts "==================================="
346- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
347-
348- puts "==================================="
349- puts "cert_profile_pdfs: Generating MockProfileRelease"
350- puts " 6th target"
351- puts "==================================="
352- Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
353- end
342+ namespace :gen do
343+ desc <<~DESC
344+ Generate all certificates and profile PDFs.
345+ DESC
346+ task :cert_profile_pdfs do
347+ puts "==================================="
348+ puts "cert_profile_pdfs: Generating MC100"
349+ puts " 1st target"
350+ puts "==================================="
351+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MC100.pdf" ] . invoke
352+
353+ puts "=================================================="
354+ puts "cert_profile_pdfs: Generating MockCertificateModel"
355+ puts " 2nd target"
356+ puts "=================================================="
357+ Rake ::Task [ "#{ $root} /gen/certificate_doc/pdf/MockCertificateModel.pdf" ] . invoke
358+
359+ puts "==================================="
360+ puts "cert_profile_pdfs: Generating RVA20"
361+ puts " 3rd target"
362+ puts "==================================="
363+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA20.pdf" ] . invoke
364+
365+ puts "==================================="
366+ puts "cert_profile_pdfs: Generating RVA22"
367+ puts " 4th target"
368+ puts "==================================="
369+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVA22.pdf" ] . invoke
370+
371+ puts "==================================="
372+ puts "cert_profile_pdfs: Generating RVI20"
373+ puts " 5th target"
374+ puts "==================================="
375+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/RVI20.pdf" ] . invoke
376+
377+ puts "==================================="
378+ puts "cert_profile_pdfs: Generating MockProfileRelease"
379+ puts " 6th target"
380+ puts "==================================="
381+ Rake ::Task [ "#{ $root} /gen/profile_doc/pdf/MockProfileRelease.pdf" ] . invoke
382+ end
383+ end
0 commit comments